Re: [opensuse] OpenSuSE via NFS/unionfs
In addition, the dhclient-script that is referenced by last patch. Note that the script terminates its parent, dhclient. (Which is what is wanted) #!/bin/bash ls -l /proc/$$/fd/ >/dev/console; #dbg exec </dev/console; exec >/dev/console; exec 2>/dev/console; exec 255>/dev/console; echo Running script; function make_resolv_conf() { mkdir -p /.DYNAMIC/etc; f="/.DYNAMIC/etc/resolv.conf"; >"$f"; echo -e "search $new_domain_name" >>"$f"; for n in $new_domain_name_servers; do echo -e "nameserver $n" >>"$f"; done; } function to_cidr() { case "$1" in 0|0.0.0.0) echo 0;; 1|128.0.0.0) echo 1;; 2|192.0.0.0) echo 2;; 3|224.0.0.0) echo 3;; 4|240.0.0.0) echo 4;; 5|248.0.0.0) echo 5;; 6|252.0.0.0) echo 6;; 7|254.0.0.0) echo 7;; 8|255.0.0.0) echo 8;; 9|255.128.0.0) echo 9;; 10|255.192.0.0) echo 10;; 11|255.224.0.0) echo 11;; 12|255.240.0.0) echo 12;; 13|255.248.0.0) echo 13;; 14|255.252.0.0) echo 14;; 15|255.254.0.0) echo 15;; 16|255.255.0.0) echo 16;; 17|255.255.128.0) echo 17;; 18|255.255.192.0) echo 18;; 19|255.255.224.0) echo 19;; 20|255.255.240.0) echo 20;; 21|255.255.248.0) echo 21;; 22|255.255.252.0) echo 22;; 23|255.255.254.0) echo 23;; 24|255.255.255.0) echo 24;; 25|255.255.255.128) echo 25;; 26|255.255.255.192) echo 26;; 27|255.255.255.224) echo 27;; 28|255.255.255.240) echo 28;; 29|255.255.255.248) echo 29;; 30|255.255.255.252) echo 30;; 31|255.255.255.254) echo 31;; 32|255.255.255.255) echo 32;; *) echo "*";; esac; } export PATH="/bin:/lib/klibc/bin:/sbin:/usr/bin:/usr/sbin"; case "$reason" in PREINIT) ip link set dev $interface up; ;; BOUND) mask="`to_cidr $new_subnet_mask`"; ip addr add "$new_ip_address/$mask" brd "$new_broadcast_address" \ dev "$interface"; # ip route add "$new_network_number/$mask" dev "$interface" \ # proto kernel scope link src "$new_ip_address"; for r in $new_routers; do ip route add via "$r" dev "$interface"; done; [ "$new_filename" == "/pxelinux.0" -a ! -e /.DYNAMIC/.next-server ] && \ echo -e "$new_dhcp_server_identifier" >/.DYNAMIC/.next-server; # Kill dhclient array=($(cat /proc/$$/stat)) kill -TERM ${array[3]}; :; ;; FAIL) exit 1; ;; *) ;; esac; #============================================================================== -`J' -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (1)
-
Jan Engelhardt