summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/bin
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-01-18 13:22:01 +0100
committerDirk von Suchodoletz2006-01-18 13:22:01 +0100
commit96e5310fb00aeee57cb381f01aa18dafb04e4272 (patch)
tree18d3aa3ead25d79fea4b7042fc8fab052f34af20 /initrd/initrd-stuff/bin
parentgdm Konfiguration klappt nun. Kommentare angefuegt ... (diff)
downloadcore-96e5310fb00aeee57cb381f01aa18dafb04e4272.tar.gz
core-96e5310fb00aeee57cb381f01aa18dafb04e4272.tar.xz
core-96e5310fb00aeee57cb381f01aa18dafb04e4272.zip
Hässlichen Bug bei dhclient IP Konfig. beseitig. Etliche Services
hinzugefügt. SuSE Funktionen (functions-suse...) erweitert. git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@18 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/bin')
-rwxr-xr-xinitrd/initrd-stuff/bin/dhcpmkconfig16
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig48
2 files changed, 45 insertions, 19 deletions
diff --git a/initrd/initrd-stuff/bin/dhcpmkconfig b/initrd/initrd-stuff/bin/dhcpmkconfig
index 9d622842..d1bc3dfd 100755
--- a/initrd/initrd-stuff/bin/dhcpmkconfig
+++ b/initrd/initrd-stuff/bin/dhcpmkconfig
@@ -1,9 +1,10 @@
#!/bin/sh
#
-# Description: universal (distro independent) configuration writer for
-# several dhcp clients
+# Description: universal (distro independent) IP configuration writer for
+# several dhcp clients. The result is written in unified form
+# to the /etc/machine-setup file
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 17-01-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 18-01-2006
# Blabla
# Blub
#
@@ -17,7 +18,8 @@ echo -e "\n# ip configuration written by $0" \
>>/etc/machine-setup
case $0 in
*dhcpd*)
- cat /var/lib/dhcp/dhcpcd-eth0.info | sed -e "s,',\",g" \
+ 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," \
@@ -28,14 +30,16 @@ case $0 in
-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 | 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,language=,country=," -e "s,ip_address,clientip," \
>>/etc/machine-setup
;;
+ *pump*)
+ #
+ ;;
esac
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index a984805e..a18576f1 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -111,28 +111,28 @@ if [ -n "$bootlocal_script" ]; then
$bootlocal_script" >> /mnt/etc/${INITDIR}/boot.local
fi
-# setup nis configuration if needed
-if [ "x$nis_domain" != "x" ] && [ "x$nis_servers" != "x" ] ; then
- echo $nis_domain >/mnt/etc/defaultdomain
- echo -e "# /etc/yp.conf - file generated by $0:\n\
-#\t$date\n\nypserver "$nis_servers >/mnt/etc/yp.conf
- strinfile "+::::::" /mnt/etc/passwd || echo "+::::::" >>/mnt/etc/passwd
-fi
-
#######################################################################
# basic (non network) services
-# at daemon
+# at daemon - calling distro specific function config_atd
config_atd "14" "04"
-# configuration of cron services
+# configuration of cron services - calling distro specific function
+# config_cron (runlevel links, directories, ...)
[ "x$crontab_entries" != "x" ] && \
echo -e "$crontab_entries" >> /mnt/etc/crontab
config_cron "16" "04"
-# acpi and powersave
-config_acpi "10" "10"
+# setup system log services - distro dependent function config_syslog
+config_syslog "02" "20"
+# configure dbus - distro dependent function config_dreshal - handle all
+# stuff regarding dependent services like dbus, resmgr, hal ...
+# (check for runlevel scripts, passwd entries, directories ...)
+config_dreshal "03" "18"
+
+# acpi and powersave - distro dependent function config_acpi
+config_acpi "10" "10"
#######################################################################
# network(ed) services
@@ -237,15 +237,24 @@ if [ "x$start_xdmcp" != "xno" ] ; then
if [ "$start_xdmcp" = "yes" ] ; then
start_xdmcp=kdm
fi
+ # just ensure lowercase
+ start_xdmcp=`echo $start_xdmcp|sed -e "y/'KGWXDM'/'kgwxdm'/"`
case "$start_xdmcp" in
wdm)
# anywhere in use!?
;;
+ kdm)
+ # config is most probably not common in all distros?
+ # distro specific function config_kdm
+ config_kdm
+ ;;
gdm)
+ # config is most probably not common in all distros?
+ # distro specific function config_gdm
config_gdm
;;
*)
- # setup xdm
+ # setup xdm (should be the same over the several distros)
echo -e "# /etc/X11/xdm/xdm-config - file generated by\n\
#\t$0: $date\n\nDisplayManager.errorLogFile:\t/var/log/xdm.errors\n\
DisplayManager.pidFile:\t\t/var/run/xdm.pid\n\
@@ -263,7 +272,20 @@ DisplayManager.*.session:\t/etc/X11/xdm/Xsession\n\
DisplayManager.*.reset:\t\t/etc/X11/xdm/Xreset" >/mnt/etc/X11/xdm/xdm-config
[ "$xdmcp" = "false" ] && echo -e \
"DisplayManager.requestPort:\t0\n" >>/mnt/etc/X11/xdm/xdm-config
+ # distro specific function config_xdm (at least for runlevel links)
config_xdm
;;
esac
fi
+
+#######################################################################
+# NIS
+# setup nis configuration if needed
+if [ "x$nis_domain" != "x" ] && [ "x$nis_servers" != "x" ] ; then
+ echo $nis_domain >/mnt/etc/defaultdomain
+ echo -e "# /etc/yp.conf - file generated by $0:\n\
+#\t$date\n\nypserver "$nis_servers >/mnt/etc/yp.conf
+ # should be last in passwd file
+ strinfile "+::::::" /mnt/etc/passwd || echo "+::::::" >>/mnt/etc/passwd
+fi
+