From ad228600dba989475744f9a2142ca4d53ee8cdbe Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Tue, 22 Jan 2013 11:42:48 +0100 Subject: init --- bin/busybox | Bin 0 -> 2057504 bytes bin/ifup | 7 +++++++ bin/resume | Bin 0 -> 1317856 bytes bin/sh | 1 + bin/udhcpc.script | 47 +++++++++++++++++++++++++++++++++++++++++++++++ bin/vgchange | 1 + 6 files changed, 56 insertions(+) create mode 100755 bin/busybox create mode 100755 bin/ifup create mode 100755 bin/resume create mode 120000 bin/sh create mode 100755 bin/udhcpc.script create mode 120000 bin/vgchange (limited to 'bin') diff --git a/bin/busybox b/bin/busybox new file mode 100755 index 0000000..3d56a2d Binary files /dev/null and b/bin/busybox differ diff --git a/bin/ifup b/bin/ifup new file mode 100755 index 0000000..2b60f1c --- /dev/null +++ b/bin/ifup @@ -0,0 +1,7 @@ +#!/bin/sh + +DEV=$1 + +ifconfig $DEV up +udhcpc -t 5 -q -s /bin/udhcpc.script + diff --git a/bin/resume b/bin/resume new file mode 100755 index 0000000..977924b Binary files /dev/null and b/bin/resume differ diff --git a/bin/sh b/bin/sh new file mode 120000 index 0000000..c3fa810 --- /dev/null +++ b/bin/sh @@ -0,0 +1 @@ +busybox \ No newline at end of file diff --git a/bin/udhcpc.script b/bin/udhcpc.script new file mode 100755 index 0000000..40ee738 --- /dev/null +++ b/bin/udhcpc.script @@ -0,0 +1,47 @@ +#!/bin/sh +# udhcpc script edited by Tim Riker + +RESOLV_CONF="/etc/resolv.conf" + +[ -n "$1" ] || { echo "Error: should be called from udhcpc"; exit 1; } + +NETMASK="" +[ -n "$subnet" ] && NETMASK="netmask $subnet" +BROADCAST="broadcast +" +[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" + +case "$1" in + deconfig) + echo "Setting IP address 0.0.0.0 on $interface" + ifconfig $interface 0.0.0.0 + ;; + + renew|bound) + echo "Setting IP address $ip on $interface" + ifconfig $interface $ip $NETMASK $BROADCAST + + if [ -n "$router" ] ; then + echo "Deleting routers" + while route del default gw 0.0.0.0 dev $interface ; do + : + done + + metric=0 + for i in $router ; do + echo "Adding router $i" + route add default gw $i dev $interface metric $((metric++)) + done + fi + + echo "Recreating $RESOLV_CONF" + echo -n > $RESOLV_CONF-$$ + [ -n "$domain" ] && echo "search $domain" >> $RESOLV_CONF-$$ + for i in $dns ; do + echo " Adding DNS server $i" + echo "nameserver $i" >> $RESOLV_CONF-$$ + done + mv $RESOLV_CONF-$$ $RESOLV_CONF + ;; +esac + +exit 0 diff --git a/bin/vgchange b/bin/vgchange new file mode 120000 index 0000000..9428656 --- /dev/null +++ b/bin/vgchange @@ -0,0 +1 @@ +lvm \ No newline at end of file -- cgit v1.2.3