From 0677328054a51160b79af3fb982b852294c5e175 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 20 Aug 2008 12:20:07 +0000 Subject: * merged branch 'initramfs-ng' back intro trunk - requires careful testing ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2055 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/stage3-stuff/bin/dhcpmkconfig | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 initramfs/stage3-stuff/bin/dhcpmkconfig (limited to 'initramfs/stage3-stuff/bin/dhcpmkconfig') diff --git a/initramfs/stage3-stuff/bin/dhcpmkconfig b/initramfs/stage3-stuff/bin/dhcpmkconfig new file mode 100755 index 00000000..66f16371 --- /dev/null +++ b/initramfs/stage3-stuff/bin/dhcpmkconfig @@ -0,0 +1,31 @@ +#!/bin/ash +# Copyright (c) 2003..2006 - RZ Uni Freiburg +# Copyright (c) 2006..2008 - OpenSLX GmbH +# +# This program is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your feedback to feedback@openslx.org +# +# General information about OpenSLX can be found under http://openslx.org +# +# Universal (distro independent) IP configuration writer for busybox udhcpc +# applet used within OpenSLX initramfs. The result is written to the +# /etc/initramfs-setup file + +# heavy debugging output in level 3 and above ... and on 13 +#FIXME: DEBUGLEVEL is not propagated to this file (at least for Ubuntu) +[ -z "$DEBUGLEVEL" ] && DEBUGLEVEL=0 +[ $DEBUGLEVEL -gt 3 -a $DEBUGLEVEL -lt 8 -o $DEBUGLEVEL -eq 13 ] && \ + set -x + +echo -e "# network configuration written by $0:" >/tmp/confviadhcp +unset infomsg HOME IFS mask lease interface cfgmsg cfgfile DEBUGLEVEL +set | sed \ + -e "s,^P.*,,;s,ntpsrv,ntp_servers,;s,ip,clientip," \ + -e "s,serverid,serverip,;s,subnet,subnet_mask," \ + -e "s,router,gateway,;s,hostname,host_name," \ + -e "s,domain,domain_name,;s,dns,domain_name_servers," \ + -e "s,broadcast,broadcast_address,;s,dhc.*,,;/^$/d" \ + -e "/OPTIND.*/d" >>/tmp/confviadhcp -- cgit v1.2.3-55-g7522