summaryrefslogtreecommitdiffstats
path: root/initramfs/stage3-stuff/bin/dhcpmkconfig
diff options
context:
space:
mode:
authorOliver Tappe2008-08-20 14:20:07 +0200
committerOliver Tappe2008-08-20 14:20:07 +0200
commit0677328054a51160b79af3fb982b852294c5e175 (patch)
treeeecc8c2a1808aa61296dd50ebceef4b887f9dba4 /initramfs/stage3-stuff/bin/dhcpmkconfig
parentThere is no working 64bit version of the old initramfs ... (diff)
downloadcore-0677328054a51160b79af3fb982b852294c5e175.tar.gz
core-0677328054a51160b79af3fb982b852294c5e175.tar.xz
core-0677328054a51160b79af3fb982b852294c5e175.zip
* 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
Diffstat (limited to 'initramfs/stage3-stuff/bin/dhcpmkconfig')
-rwxr-xr-xinitramfs/stage3-stuff/bin/dhcpmkconfig31
1 files changed, 31 insertions, 0 deletions
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