diff options
| author | Dirk von Suchodoletz | 2006-03-27 01:22:18 +0200 |
|---|---|---|
| committer | Dirk von Suchodoletz | 2006-03-27 01:22:18 +0200 |
| commit | 2c8289173525442e353a713795b44d55368fbc8f (patch) | |
| tree | a710765d7ab9e78e4b26564b515f6359faca4dd9 /initrd/initrd-stuff/bin/dhcpmkconfig | |
| parent | ensured "ash" compatibility, minor fixes and cleanups, ... (diff) | |
| download | core-2c8289173525442e353a713795b44d55368fbc8f.tar.gz core-2c8289173525442e353a713795b44d55368fbc8f.tar.xz core-2c8289173525442e353a713795b44d55368fbc8f.zip | |
fixed ugly bug with ldd library detection, fixed bug for dhcpcd use,
started to integrate gentoo, minor fixes ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@129 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/bin/dhcpmkconfig')
| -rwxr-xr-x | initrd/initrd-stuff/bin/dhcpmkconfig | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/initrd/initrd-stuff/bin/dhcpmkconfig b/initrd/initrd-stuff/bin/dhcpmkconfig index b7dd3cbd..b6c436a6 100755 --- a/initrd/initrd-stuff/bin/dhcpmkconfig +++ b/initrd/initrd-stuff/bin/dhcpmkconfig @@ -4,39 +4,32 @@ # several dhcp clients. The result is written in unified form # to the /etc/machine-setup file # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 18-01-2006 -# Blabla -# Blub +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 26-03-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg -# functions common for all distros -. /etc/functions - # client variable should be exported via calling function echo -e "\n# ip configuration written by $0" \ >>/etc/machine-setup case $0 in - *dhcpd*) - cat /var/lib/dhcp/dhcpcd-eth0.info | sed -n -e '/^new/p' | sed \ - -e "s,',\",g" \ - -e "s,IPADDR,clientip," -e "s,NETMASK,subnet_mask," \ - -e "s,GATEWAY,gateway," -e "s,BROADCAST,broadcast_address," \ - -e "s,HOSTNAME,host_name," -e "s,DOMAIN,domain_name," \ - -e "s,ROOTPATH,root_path," -e "s,DNS,domain_name_servers," \ - -e "s,NTPSERVERS,ntp_servers," -e "s,DHCPSID,serverip," \ + *dhcpcd*) + sed -e "s,',\",g;s,IPADDR,clientip,;s,NETMASK,subnet_mask," \ + -e "s,GATEWAY,gateway,;s,BROADCAST,broadcast_address," \ + -e "s,HOSTNAME,host_name,;s,DOMAIN,domain_name," \ + -e "s,ROOTPATH,root_path,;s,DNS,domain_name_servers," \ + -e "s,NTPSERVERS,ntp_servers,;s,DHCPSID,serverip," \ -e "s,WINSSERVERS,netbios_name_servers," \ -e "s,NETWORK,network," \ - -e "s,DHCP..ADDR.*,," -e "s,.*TIME=.*,," -e "s,CL.*,," \ - -e "s,INTER.*,," -e "s,DHCPSNAME.*,," \ + -e "s,DHCP..ADDR.*,,;s,.*TIME=.*,,;s,CL.*,,;/^$/d" \ + -e "s,INTER.*,,;s,DHCPSNAME.*,," /var/lib/dhcp/dhcpcd-eth0.info \ >>/etc/machine-setup ;; *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,.*_t[iy][mp]e.*,," -e "s,.*_message_.*,," -e "/^$/d" \ - -e "s,language=,country=," -e "s,ip_address,clientip," \ + -e "s,^new_,,;s,fixed_address,clientip," \ + -e "s,routers,gateway,;s,dhcp_server_identifier,serverip," \ + -e "s,.*_t[iy][mp]e.*,,;s,.*_message_.*,,;/^$/d" \ + -e "s,language=,country=,;s,ip_address,clientip," \ >>/etc/machine-setup ;; *pump*) |
