summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-03-30 22:10:13 +0200
committerDirk von Suchodoletz2006-03-30 22:10:13 +0200
commit8cd82995c9c01fac59aa5ff6ef17a098d73db5d9 (patch)
treed59261674adccf0ee39016be3fef556463708dba
parentNew functionality for retrieving the frequency ranges of the monitor from ddc... (diff)
downloadcore-8cd82995c9c01fac59aa5ff6ef17a098d73db5d9.tar.gz
core-8cd82995c9c01fac59aa5ff6ef17a098d73db5d9.tar.xz
core-8cd82995c9c01fac59aa5ff6ef17a098d73db5d9.zip
more debug level, exclude-common for rsync (files and directories common
for all distros), ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@132 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--initrd/distro-specs/gentoo/functions-2005.16
-rw-r--r--initrd/distro-specs/suse/functions-10.19
-rw-r--r--initrd/distro-specs/suse/functions-9.321
-rw-r--r--initrd/distro-specs/ubuntu/functions-5.105
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig5
-rwxr-xr-xinitrd/initrd-stuff/init15
-rwxr-xr-xinitrd/mkdxsinitrd3
-rw-r--r--installer/distro-specs/exclude-common29
-rw-r--r--installer/distro-specs/exclude-suse-10.129
-rwxr-xr-xinstaller/ld4-inst10
10 files changed, 84 insertions, 48 deletions
diff --git a/initrd/distro-specs/gentoo/functions-2005.1 b/initrd/distro-specs/gentoo/functions-2005.1
index ddc70fc9..30006b3a 100644
--- a/initrd/distro-specs/gentoo/functions-2005.1
+++ b/initrd/distro-specs/gentoo/functions-2005.1
@@ -2,7 +2,7 @@
# linux diskless clients (executed within initial
# ramdisk after genconfig)
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 26-03-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-03-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
@@ -17,6 +17,10 @@ postinit () {
:
}
+config_distro () {
+ :
+}
+
# udev service - not checked!
udev_hotplug () {
echo "Starting udev"
diff --git a/initrd/distro-specs/suse/functions-10.1 b/initrd/distro-specs/suse/functions-10.1
index a41cd223..b58b9131 100644
--- a/initrd/distro-specs/suse/functions-10.1
+++ b/initrd/distro-specs/suse/functions-10.1
@@ -3,17 +3,15 @@
# changes should be done there, version specific changes for
# the 10.0 here.
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 16-02-2006
-# Blabla
-# Blub
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-03-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.1d
+# Version: 0.2.1e
# distro specific stuff to initialize
preinit () {
-for i in usb_id scsi_id vol_id edd_id ata_id hwup ifup ; do
+for i in usb_id scsi_id vol_id edd_id ata_id path_id hwup ifup ; do
echo -e "#!/bin/sh\n:" >/sbin/$i
done
mkdir /lib/udev /usr/sbin
@@ -23,6 +21,7 @@ done
echo -e "#!/bin/sh\n:" >/usr/sbin/alsactl
chmod u+x /sbin/* /lib/udev/* /usr/sbin/*
}
+
postinit () {
:
}
diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3
index bd988d52..83ec77f6 100644
--- a/initrd/distro-specs/suse/functions-9.3
+++ b/initrd/distro-specs/suse/functions-9.3
@@ -20,6 +20,22 @@ postinit () {
udevstart
}
+# distro specific function called from servconfig script
+config_distro () {
+# enable magic sysrequest for the clients
+echo -e "# /etc/sysconfig/sysctl - file modified by $0 version $version"\
+ > /mnt/etc/${D_SYSCONFDIR}/sysctl.new
+sed -e "s,ENABLE_SYSRQ=.*,ENABLE_SYSRQ=\"yes\"," \
+ /mnt/etc/${D_SYSCONFDIR}/sysctl > /etc/sysctl
+cat /etc/sysctl >> /mnt/etc/${D_SYSCONFDIR}/sysctl
+# add specific path /var/X11R6/bin ...
+echo -e "# stuff generated by $0 (out of InitRD written $date)\n\
+test \"\$UID\" -ge 100 && PATH=\"\$PATH:/var/X11R6/bin:.\"\n\
+QTDIR=/usr/lib/qt3\nexport QTDIR\nno_proxy='localhost'\n\
+export no_proxy" > /etc/SuSEconfig/profile
+}
+
+
# udev/hotplug - auto device discovery service
udev_hotplug () {
local result=0
@@ -58,8 +74,9 @@ if [ -f /mnt/etc/init.d/ntp ] ; then
fi
testmkd /mnt/var/lib/ntp/var/run/ntp &>/dev/null
if [ "x$start_ntp" = "xinitial" ] ; then
- echo -e "\t# entries added by $0: $date\n\t( ntpdate -s -b $ntp_servers\
- >${LOGFILE} 2>&1 && {\n\t which hwclock &>/dev/null && hwclock -w;} ) &" \
+ echo -e "\t# entries added by $0 (InitRamFS from $date)\n\
+\t( ntpdate -s -b $ntp_servers >${LOGFILE} 2>&1 && {\n\t which \
+hwclock &>/dev/null && hwclock -w;} ) &" \
>>/mnt/etc/${D_INITDIR}/boot.ld
elif [ "x$start_ntp" = "xyes" ] ; then
rllinker "ntp" "$start" "$stop"
diff --git a/initrd/distro-specs/ubuntu/functions-5.10 b/initrd/distro-specs/ubuntu/functions-5.10
index 31a20a64..5f25d014 100644
--- a/initrd/distro-specs/ubuntu/functions-5.10
+++ b/initrd/distro-specs/ubuntu/functions-5.10
@@ -25,6 +25,11 @@ postinit () {
:
}
+# distro specific function called from servconfig script
+config_distro () {
+ :
+}
+
# AUS SuSE-9.3
# udev/hotplug - auto device discovery service
udev_hotplug () {
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index 497be9b7..1f12f279 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -142,6 +142,11 @@ case ${DISTRO} in
;;
esac
+#######################################################################
+#
+# run distro specific configuration function
+config-distro
+
#######################################################################
#
diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init
index f0882aea..7081cd3e 100755
--- a/initrd/initrd-stuff/init
+++ b/initrd/initrd-stuff/init
@@ -2,13 +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>, 23-03-2006
-# Bla
-# Blub
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-03-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.3c
+# Version: 0.2.3d
# functions common for all distros
errmsg="functions file contains a lot of script \
@@ -20,7 +18,7 @@ functionality. Without this\ninit script will not run."
specific configuration file could not be found" && exit 1 )
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin
-export date="23-03-2006"
+export date="@@@DATE@@@"
export DEBUGLEVEL=0
export KERNEL="@@@KERNVER@@@"
@@ -166,7 +164,7 @@ if [ "${DEBUGLEVEL}" -gt 0 ] ; then
LOGFILE="/var/log/dxs-boot.log"
echo "1 4 1 7" >/proc/sys/kernel/printk
[ "${DEBUGLEVEL}" -eq 2 ] && MODPRV="-v"
- [ "${DEBUGLEVEL}" -gt 2 ] && {
+ [ "${DEBUGLEVEL}" -gt 3 ] && {
set -x
# modprobe should be verbose
MODPRV="-v";
@@ -425,11 +423,12 @@ and list the modules loaded until\n now."
# should be killed if started within init
killall -9 dhcpcd dhclient pump 2>/dev/null
-[ $DEBUGLEVEL -gt 1 ] && sh
-
# post init for some distro specific
postinit
+# start a debug shell in higher debug levels
+[ $DEBUGLEVEL -gt 2 ] && /bin/sh
+
# unmount the bind mounted modules directory
for i in 0 40 100 200 300 500 800 1000 1200; do
usleep $i && umount -n /lib/modules/${KERNEL} 2>/dev/null && break
diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd
index e8c44915..4df246a7 100755
--- a/initrd/mkdxsinitrd
+++ b/initrd/mkdxsinitrd
@@ -100,6 +100,7 @@ chroot ${ROOTDIR} ldd.server ${FPTB#${ROOTDIR}*} >> ${INSTDIR}/tmp/libraries
repco()
{
local FILENAME=$1
+DATE=`date +%m-%d-%Y`
# do not forget to define all variables which should be replaced within
# the start and configuration scripts. All comment lines will be deleted.
if [ -d initrd-stuff/${FILENAME} ] ; then
@@ -115,7 +116,7 @@ else
-e "s,@@@NWMODULES@@@,${NWMODULES},g" \
-e "s,@@@COMDIRINDXS@@@,${COMDIRINDXS},g" \
-e "s,@@@COMETCEXCL@@@,${COMETCEXCL},g" \
- -e "/^#[^!].*/d" \
+ -e "s,@@@DATE@@@,${DATE},g;/^#[^!].*/d" \
initrd-stuff/${FILENAME} >> ${INSTDIR}/${FILENAME}
fi
fi
diff --git a/installer/distro-specs/exclude-common b/installer/distro-specs/exclude-common
new file mode 100644
index 00000000..9fffa442
--- /dev/null
+++ b/installer/distro-specs/exclude-common
@@ -0,0 +1,29 @@
++ /bin
++ /boot
++ /dev
++ /etc
++ /home
++ /lib
++ /lib64
++ /mnt
++ /opt
++ /proc
++ /root
++ /sbin
++ /sys
++ /tmp
++ /usr
++ /var
+- /etc/shadow*
+- /dev/*
+- /proc/*
+- /sys/*
+- /tmp/*
+- /root/*
+- /home/*
+- /mnt/*
+- /*
+- .svn
+- *~
+- *lost+found*
+
diff --git a/installer/distro-specs/exclude-suse-10.1 b/installer/distro-specs/exclude-suse-10.1
index 7e49a641..17152259 100644
--- a/installer/distro-specs/exclude-suse-10.1
+++ b/installer/distro-specs/exclude-suse-10.1
@@ -1,22 +1,4 @@
-+ /bin
-+ /boot
-+ /dev
-+ /etc
-+ /home
-+ /lib
-+ /lib64
+ /media
-+ /mnt
-+ /opt
-+ /proc
-+ /root
-+ /sbin
-+ /sys
-+ /tmp
-+ /usr
-+ /var
-- .svn
-- *~
- *.rpmsave
- *.rpmnew
- *.YaST2save
@@ -25,13 +7,6 @@
- /lib/klibc/events/*
- /boot/initrd*
- /boot/grub
-- /dev/*
-- /etc/shadow*
-- /proc/*
-- /sys/*
-- /tmp/*
-- /root/*
-- /home/*
- /var/cache/man/*
- /var/lib/YaST2/you/mnt/*
- /var/lib/hardware/*
@@ -42,8 +17,8 @@
- /var/lib/xdm
- /usr/share/vmware/*
- *lost+found*
-- /mnt/*
- /media/*
- /opt/kde3/share/autostart/SUSEgreeter.desktop
- /opt/kde3/share/autostart/suseplugger.desktop
-- /*
+- /opt/kde3/share/autostart/profile_chooser-autostart.desktop
+- /opt/kde3/share/autostart/knetworkmanager-autostart.desktop
diff --git a/installer/ld4-inst b/installer/ld4-inst
index 4407a708..9bb4c6c3 100755
--- a/installer/ld4-inst
+++ b/installer/ld4-inst
@@ -3,8 +3,8 @@
# Description: Script for generating dxs filesystem by
# cloning from rsync source for Diskless X Stations (v4.0)
#
-# Author(s): Nico Dietrich
-# Dirk von Suchodoletz <dirk@goe.net>, 02-11-2005
+# Author(s): Nico Dietrich, 22-03-2006
+# Dirk von Suchodoletz <dirk@goe.net>, 30-03-2006
#
# Copyright: (c) 2003, 2005 - RZ Universitaet Freiburg
#
@@ -208,7 +208,9 @@ configure() {
copy_system() {
echo -e "\n\nSyncing system now\nPlease enter root password of client machine\n"
- rsync -avDe ssh --delete --exclude-from=distro-specs/exclude-${client_distro}-${client_distro_ver} ${rsyncsource} ${rootdir} || { echo "Rsync failed" ; exit 1 ; }
+ rsync -avDe ssh --delete --exclude-from=distro-specs/exclude-common \
+ --exclude-from=distro-specs/exclude-${client_distro}-${client_distro_ver} \
+ ${rsyncsource} ${rootdir} || { echo "Rsync failed" ; exit 1 ; }
# generate error message in case rsync didn't work and exit.
@@ -302,7 +304,7 @@ setup_server () {
current_initrd=${tftpbootdir}/initrd-dxs-${current_kernel}
if [ $j -eq 0 ] ; then
- default_string=" MENU DEFAULT\n"
+ default_string="\tMENU DEFAULT\n"
else
default_string=""
fi