mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
34 lines
990 B
Text
Executable file
34 lines
990 B
Text
Executable file
echo "Preparing Plugbox Linux..."
|
|
#modprobe ext2
|
|
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
|
|
export kit=/sdcard/plugbox
|
|
export bin=/system/bin
|
|
export mnt=/data/local/mnt
|
|
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
|
|
export TERM=linux
|
|
export HOME=/root
|
|
mknod /dev/loop2 b 7 0
|
|
mount -o loop,noatime -t ext2 $kit/plugbox.img $mnt
|
|
mount -t devpts devpts $mnt/dev/pts
|
|
mount -t proc proc $mnt/proc
|
|
mount -t sysfs sysfs $mnt/sys
|
|
sysctl -w net.ipv4.ip_forward=1
|
|
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
|
|
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
|
|
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
|
|
echo "Setting localhost on /etc/hosts "
|
|
echo "127.0.0.1 localhost" > $mnt/etc/hosts
|
|
echo ""
|
|
echo "Brought to you by NexusOneHacks.net and PlugApps."
|
|
echo " "
|
|
chroot $mnt /bin/bash
|
|
|
|
#After exit command is executed clear it all up
|
|
echo ""
|
|
|
|
echo "Cleaning up..."
|
|
umount $mnt/dev/pts
|
|
umount $mnt/proc
|
|
umount $mnt/sys
|
|
umount $mnt
|
|
#losetup -d /dev/loop2
|