Created
April 29, 2013 09:17
-
-
Save anonymous/5480567 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -x | |
mount -o remount,exec /run | |
R=/run/root | |
IPADDR=192.168.0.159/8 | |
mkdir -p "$R/proc" | |
cp -r /bin /lib "$R" | |
cat > "$R/script" <<EOF | |
mount -t proc none /proc | |
brctl addbr br0 | |
brctl addif br0 eth0 | |
ifconfig br0 "$IPADDR" | |
ifconfig eth0 0.0.0.0 | |
umount /proc | |
EOF | |
chroot "$R" busybox sh script | |
rm -r "$R/bin" "$R/lib" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment