diff options
| author | Nico Dietrich | 2006-01-12 18:44:55 +0100 |
|---|---|---|
| committer | Nico Dietrich | 2006-01-12 18:44:55 +0100 |
| commit | 6e7ef11152c910101d66d10b418d1b27f566ec3a (patch) | |
| tree | ad5e4b53e28ddf8bb8b5015b60e9f3f41a8783f3 /initrd/initrd-stuff/bin/dhcpmkconfig | |
| download | core-6e7ef11152c910101d66d10b418d1b27f566ec3a.tar.gz core-6e7ef11152c910101d66d10b418d1b27f566ec3a.tar.xz core-6e7ef11152c910101d66d10b418d1b27f566ec3a.zip | |
Ersteinstellung von ld v4 ins SVN
git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@11 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/bin/dhcpmkconfig')
| -rwxr-xr-x | initrd/initrd-stuff/bin/dhcpmkconfig | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/initrd/initrd-stuff/bin/dhcpmkconfig b/initrd/initrd-stuff/bin/dhcpmkconfig new file mode 100755 index 00000000..a7cbda19 --- /dev/null +++ b/initrd/initrd-stuff/bin/dhcpmkconfig @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Description: universal (distro independent) configuration writer for +# several dhcp clients +# +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 07-01-2006 +# Blabla +# Blub +# +# 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 $client in + dhcpcd) + 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," \ + -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," \ + -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.*,," \ + >>/etc/machine-setup + # empty lines should be removed somehow + ;; + dhclient) + set | grep "new_" | 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 + ;; +esac + |
