summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/bin/servconfig
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-03-27 01:22:18 +0200
committerDirk von Suchodoletz2006-03-27 01:22:18 +0200
commit2c8289173525442e353a713795b44d55368fbc8f (patch)
treea710765d7ab9e78e4b26564b515f6359faca4dd9 /initrd/initrd-stuff/bin/servconfig
parentensured "ash" compatibility, minor fixes and cleanups, ... (diff)
downloadcore-2c8289173525442e353a713795b44d55368fbc8f.tar.gz
core-2c8289173525442e353a713795b44d55368fbc8f.tar.xz
core-2c8289173525442e353a713795b44d55368fbc8f.zip
fixed ugly bug with ldd library detection, fixed bug for dhcpcd use,
started to integrate gentoo, minor fixes ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@129 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/bin/servconfig')
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig98
1 files changed, 58 insertions, 40 deletions
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index 2be55ba7..5799e5f7 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -116,9 +116,28 @@ case ${DISTRO} in
done
;;
gentoo*)
+ rm /mnt/etc/*/.critical 2>/dev/null
for i in ${D_INITSCRIPTS}; do
ln -sf /etc${D_INITDIR}/$i /mnt/etc/${D_INITBOOTD}/$i
+ echo $i >> /mnt/etc/${D_INITBOOTD}/.critical
+ echo $i >> /mnt/etc/default/.critical
done
+
+# ( for i in /mnt/etc/init.d/*; do
+# strinstr ".sh" "$i" && continue
+# script=${i#/mnt/etc/init.d/*}
+# if ! strinstr "$script " "${D_INITSCRIPTS} " ; then
+# for j in /mnt/etc/init.d/*; do
+# strinstr ".sh" "$j" && continue
+# link=${j#/mnt/etc/init.d/*}
+# if ! strinstr "$script" "$link" ; then
+# sed "/depend/,/}/s/$script //;/depend/,/}/s/$script$//" \
+# /mnt/etc/init.d/$link > /tmp/rlvscript
+# cp /tmp/rlvscript /mnt/etc/init.d/$link
+# fi
+# done
+# fi
+# done ) &
;;
esac
@@ -204,7 +223,7 @@ if [ "x$vmware" != "x" ] || [ "x$vmware" != "xno" ] ; then
${imgsrv} /mnt/var/lib/vmware &
fi
# generate a runlevel script
- d_mkrlscript init vmware-prep 'Starting preparation of vmware environment'
+ d_mkrlscript init vmware-prep "Starting preparation of vmware environment"
sed "s,^#.*,,;/^$/d;s,^,\t," /etc/vmware-prep >> \
/mnt/etc/${D_INITDIR}/vmware-prep
d_mkrlscript close vmware-prep ""
@@ -217,6 +236,39 @@ if [ "x$vmware" != "x" ] || [ "x$vmware" != "xno" ] ; then
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
+
+#######################################################################
+# name service caching daemon if networked user database
+config_nscd
+
+#######################################################################
+# preparation of /tmp directory (partition 44, nfs scratch, ramdisk)
+waitfor /tmp/tmpready 10000
+# create some directories and correct permissions
+tmpisdisk=`sed -n '/\/tmp/p' /mnt/etc/fstab`
+# if there is no local disk partition for /tmp then try to mount a rw
+# NFS scratch space (if defined in $scratch) and prepared on server
+if [ -n "$scratch" -a -z "$tmpisdisk" ] ; then
+ mkdir -p /tmp/scratch >/dev/null 2>&1
+ mount -t nfs -o rw,nolock,intr,nodev,soft,timeo=2,nosuid ${scratch} \
+ /tmp/scratch >/dev/null 2>&1 && {
+ mkdir -p /tmp/scratch/${clientip} >/dev/null 2>&1
+ umount /tmp/scratch
+ mount -t nfs -o rw,nolock,intr,nodev,soft,timeo=2,nosuid \
+ ${scratch}/${clientip} /mnt/tmp >/dev/null 2>&1; }
+fi
+chmod 1777 /mnt/tmp
+
+#######################################################################
# X11/GUI stuff
if [ "x$start_x" != "xno" ] ; then
# creating directories commonly needed for X11 in all distros
@@ -225,7 +277,11 @@ if [ "x$start_x" != "xno" ] ; then
/etc/X11/xdm \
/etc/X11/sessions \
/var/X11R6/bin \
- /var/run/xdmctl; do testmkd /mnt/$i; done
+ /var/run/xdmctl \
+ /tmp/.ICE-unix \
+ /tmp/.X11-unix ; do testmkd /mnt/$i; done
+ chmod a+rwxt /mnt/tmp/.ICE-unix
+ chmod a+rwxt /mnt/tmp/.X11-unix
echo "" > /mnt/etc/X11/xdm/Xservers
# define additional sessions offered to the user (via dhcp/ldap config)
# descsession -> deprecated by new vmware integration concept
@@ -333,43 +389,5 @@ DisplayManager.*.reset:\t\t/etc/X11/xdm/Xreset" >/mnt/etc/X11/xdm/xdm-config
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
-
-#######################################################################
-# name service caching daemon if networked user database
-config_nscd
-
-#######################################################################
-# preparation of /tmp directory (partition 44, nfs scratch, ramdisk)
-waitfor /tmp/tmpready 10000
-# create some directories and correct permissions
-tmpisdisk=`sed -n '/\/tmp/p' /mnt/etc/fstab`
-# if there is no local disk partition for /tmp then try to mount a rw
-# NFS scratch space (if defined in $scratch) and prepared on server
-if [ -n "$scratch" -a -z "$tmpisdisk" ] ; then
- mkdir -p /tmp/scratch >/dev/null 2>&1
- mount -t nfs -o rw,nolock,intr,nodev,soft,timeo=2,nosuid ${scratch} \
- /tmp/scratch >/dev/null 2>&1 && {
- mkdir -p /tmp/scratch/${clientip} >/dev/null 2>&1
- umount /tmp/scratch
- mount -t nfs -o rw,nolock,intr,nodev,soft,timeo=2,nosuid \
- ${scratch}/${clientip} /mnt/tmp >/dev/null 2>&1; }
-fi
-chmod 1777 /mnt/tmp
-for i in \
- /tmp/.ICE-unix \
- /tmp/.X11-unix; do testmkd /mnt/$i; done
-chmod a+rwxt /mnt/tmp/.ICE-unix
-chmod a+rwxt /mnt/tmp/.X11-unix
-
# servconfig finished successfully
echo "finished" > /tmp/svcfg