Skip to content

Instantly share code, notes, and snippets.

/enable-br0.sh
Created Apr 29, 2013

Embed
What would you like to do?
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
You can’t perform that action at this time.