Guest User

Chroot startup script for PLUGAPPS (edited from ubuntu one))

a guest
May 6th, 2011
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.73 KB | None | 0 0
  1. export kit=/sdcard/plugapps
  2. export bin=/system/bin
  3. export mnt=/sdcard/plugapps
  4. export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
  5. export TERM=linux
  6. export HOME=/root
  7. export USER=root
  8. mknod /dev/loop1 b 7 0
  9. losetup /dev/loop1 /sdcard/plugapps.img
  10. mount -t ext2 /dev/loop1 /sdcard/plugapps/
  11. mount -t proc proc $mnt/proc
  12. mount -t sysfs sysfs $mnt/sys
  13. echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
  14. echo "nameserver 8.8.8.8" > /sdcard/plugapps/etc/resolv.conf
  15. echo "nameserver 8.8.4.4" >> /sdcard/plugapps/etc/resolv.conf
  16. chroot /sdcard/plugapps/ /bin/bash -l
  17.  
  18. #After exit command is executed clear it all up
  19. echo " "
  20.  
  21. echo "Shutting down..."
  22. umount $mnt/proc
  23. umount $mnt/sys
  24. umount $mnt
  25. losetup -d /dev/loop
Advertisement
Add Comment
Please, Sign In to add comment