summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-05-22 15:07:55 +0200
committerDirk von Suchodoletz2006-05-22 15:07:55 +0200
commitc4db6c04d5bbd889718c4297d004c56fd0772608 (patch)
tree5b157b71a5aaf68bc91dfb3f2113a88ab7c1da5e
parentbetter hw detection for devices on pcmcia, small fix for wrong error (diff)
downloadcore-c4db6c04d5bbd889718c4297d004c56fd0772608.tar.gz
core-c4db6c04d5bbd889718c4297d004c56fd0772608.tar.xz
core-c4db6c04d5bbd889718c4297d004c56fd0772608.zip
small bug fixes and additions ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@229 95ad53e4-c205-0410-b2fa-d234c58c8868
-rwxr-xr-xinitrd/initrd-stuff/bin/dhcpmkconfig13
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig2
-rw-r--r--initrd/initrd-stuff/etc/functions5
-rwxr-xr-xinitrd/initrd-stuff/init6
4 files changed, 20 insertions, 6 deletions
diff --git a/initrd/initrd-stuff/bin/dhcpmkconfig b/initrd/initrd-stuff/bin/dhcpmkconfig
index b6c436a6..3b4a1f77 100755
--- a/initrd/initrd-stuff/bin/dhcpmkconfig
+++ b/initrd/initrd-stuff/bin/dhcpmkconfig
@@ -4,15 +4,20 @@
# several dhcp clients. The result is written in unified form
# to the /etc/machine-setup file
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 26-03-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 22-05-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
# client variable should be exported via calling function
echo -e "\n# ip configuration written by $0" \
>>/etc/machine-setup
+infomsg="# --> You are using $dhcl. With this client you are not \
+able to\n# transfer any vendor specific, self defined dhcp options. If \
+this is\n# intended, use dhclient instead or get them via tftp (to be \
+enabled\n# via kernel command line)."
case $0 in
*dhcpcd*)
+ dhcl="dhcpcd"; echo -e "$infomsg" >>/etc/machine-setup
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," \
@@ -25,6 +30,10 @@ case $0 in
>>/etc/machine-setup
;;
*dhclient*)
+ echo -e "# --> You are using dhclient. Iy you wish to transfer other \
+vendor/user\n# specific variables, you have to add them in functions and \
+in\n# dhcpmkconfig script or use tftp (to be enabled via kernel \
+command\n# line)." >>/etc/machine-setup
set | sed -n -e '/^new/p' | sed \
-e "s,^new_,,;s,fixed_address,clientip," \
-e "s,routers,gateway,;s,dhcp_server_identifier,serverip," \
@@ -33,6 +42,6 @@ case $0 in
>>/etc/machine-setup
;;
*pump*)
- #
+ dhcl="pump"; echo -e "$infomsg" >>/etc/machine-setup
;;
esac
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index ab29f861..190a2489 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -175,9 +175,9 @@ config_atd
# configuration of cron services - calling distro specific function
# config_cron (runlevel links, directories, ...)
+config_cron
[ "x$crontab_entries" != "x" ] && \
echo -e "$crontab_entries" >> /mnt/etc/crontab
-config_cron
# setup system log services - distro dependent function config_syslog
config_syslog
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions
index 26a361b6..e8b12f76 100644
--- a/initrd/initrd-stuff/etc/functions
+++ b/initrd/initrd-stuff/etc/functions
@@ -247,6 +247,11 @@ case $dhcp in
error "$error_pump"
;;
ipconfig)
+ [ $DEBUGLEVEL -gt 1 ] && echo -e "# You are using ipconfig as dhcp \
+client. With this tool you only get the\n# basic IP settings from the \
+server. No vendor specific, self defined\n# dhcp options are possible this \
+way. use dhclient instead or get them via\n# tftp (to be enabled via kernel \
+command line)." >> /etc/machine-setup
error "$error_ipconf"
;;
*)
diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init
index 8fa2b12a..0d9fb45c 100755
--- a/initrd/initrd-stuff/init
+++ b/initrd/initrd-stuff/init
@@ -2,11 +2,11 @@
# Description: main script for new type of initial ramdisk for
# linux diskless clients version 4
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 21-05-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 22-05-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.4f
+# Version: 0.2.4g
# functions common for all distros, messages contains all error and info
# output
@@ -448,12 +448,12 @@ else
fi
# copy machine configuration (from global settings, additions made within
# here and from dhcp/ldap sources) to client /etc for later checks
-cp /etc/machine-setup /mnt/etc
waitfor /tmp/hwcfg 20000 || error "$init_errhw"
waitfor /tmp/svcfg 20000 || error "$init_errsw"
# IP configuration is made and should not be updated automatically, udevd
# should be killed if started within init
killall -9 dhcpcd dhclient pump 2>/dev/null
+cp /etc/machine-setup /mnt/etc
# post init for some distro specific
postinit