summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/bin/dhcpmkconfig
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-01-17 12:15:39 +0100
committerDirk von Suchodoletz2006-01-17 12:15:39 +0100
commit07be2c0ecf404f9c30ee42544539b39343f40a14 (patch)
tree4c6ae9e0425b0f95b2c0a10191131c3522fdf4aa /initrd/initrd-stuff/bin/dhcpmkconfig
parentfunctions (fuer initrd) erweitert, so dass sinnvolle Fehlermeldungen (diff)
downloadcore-07be2c0ecf404f9c30ee42544539b39343f40a14.tar.gz
core-07be2c0ecf404f9c30ee42544539b39343f40a14.tar.xz
core-07be2c0ecf404f9c30ee42544539b39343f40a14.zip
dhclient schreibt jetzt Konfiguration sauber nach machine-setup. Laden
von Modulen durch hwautocfg geht wieder (bind-mount des Modulverz. wieder aktiv). servconfig leicht erweitert (acpi und powersave) ... git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@16 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/bin/dhcpmkconfig')
-rwxr-xr-xinitrd/initrd-stuff/bin/dhcpmkconfig16
1 files changed, 8 insertions, 8 deletions
diff --git a/initrd/initrd-stuff/bin/dhcpmkconfig b/initrd/initrd-stuff/bin/dhcpmkconfig
index a7cbda19..9d622842 100755
--- a/initrd/initrd-stuff/bin/dhcpmkconfig
+++ b/initrd/initrd-stuff/bin/dhcpmkconfig
@@ -3,7 +3,7 @@
# Description: universal (distro independent) configuration writer for
# several dhcp clients
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 07-01-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 17-01-2006
# Blabla
# Blub
#
@@ -15,8 +15,8 @@
# client variable should be exported via calling function
echo -e "\n# ip configuration written by $0" \
>>/etc/machine-setup
-case $client in
- dhcpcd)
+case $0 in
+ *dhcpd*)
cat /var/lib/dhcp/dhcpcd-eth0.info | sed -e "s,',\",g" \
-e "s,IPADDR,clientip," -e "s,NETMASK,subnet_mask," \
-e "s,GATEWAY,gateway," -e "s,BROADCAST,broadcast_address," \
@@ -30,12 +30,12 @@ case $client in
>>/etc/machine-setup
# empty lines should be removed somehow
;;
- dhclient)
- set | grep "new_" | sed \
+ *dhclient*)
+ set | sed -n -e '/^new/p' | sed \
-e "s,^new_,," -e "s,fixed-address,clientip," \
-e "s,routers,gateway," -e "s,dhcp-server-identifier,serverip," \
- -e "s,.*-time.*,," -e "s,language=,country=," \
- >>/etc/machine-setup
+ -e "s,.*_t[iy][mp]e.*,," -e "s,.*_message_.*,," -e "/^$/d" \
+ -e "s,language=,country=," \
+ >>/etc/machine-setup
;;
esac
-