summaryrefslogtreecommitdiffstats
path: root/initramfs
diff options
context:
space:
mode:
authorDirk von Suchodoletz2007-10-01 00:42:49 +0200
committerDirk von Suchodoletz2007-10-01 00:42:49 +0200
commit6a27eb2c90a35c655896a73ebd2bd57977ce8a54 (patch)
tree816d6240188400a8f186c4bfb81703fb298dacbc /initramfs
parentReplaced busybox.i586 (now compiled with lower reqs toward GLIB) (diff)
downloadcore-6a27eb2c90a35c655896a73ebd2bd57977ce8a54.tar.gz
core-6a27eb2c90a35c655896a73ebd2bd57977ce8a54.tar.xz
core-6a27eb2c90a35c655896a73ebd2bd57977ce8a54.zip
Set of cleanups and minor fixes ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1361 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rwxr-xr-xinitramfs/initrd-stuff/bin/servconfig14
-rw-r--r--initramfs/initrd-stuff/etc/functions28
-rwxr-xr-xinitramfs/initrd-stuff/init2
3 files changed, 23 insertions, 21 deletions
diff --git a/initramfs/initrd-stuff/bin/servconfig b/initramfs/initrd-stuff/bin/servconfig
index 84acf102..7555c6a9 100755
--- a/initramfs/initrd-stuff/bin/servconfig
+++ b/initramfs/initrd-stuff/bin/servconfig
@@ -191,7 +191,7 @@ test -n "$domain_name_servers" && {
# delete and create runlevel links for initial booting (SuSE, Debian, Ubuntu,
# Fedora, ...)
# splashy stuff
-if [ ${DEBUGLEVEL} = 0 -a ${nosplash} = 0 ]; then
+if [ ${nosplash} = 0 ]; then
D_INITSCRIPTS="${D_INITSCRIPTS} splashy.stop"
d_mkrlscript init splashy.stop "Stopping Splashy ..."
echo -e "\t/var/lib/openslx/bin/splashy_update exit 2>/dev/null
@@ -271,7 +271,8 @@ auto.master." >/mnt/etc/auto.misc
>> /mnt/etc/auto.${automnt_dir}
# no tempfs needed if automounter operates on /home
[ "${automnt_dir}" = "home" ] && umount -t tmpfs /mnt/home 2>/dev/null
- # portmapper is needed for remote NFS sources
+ # portmapper is needed for remote NFS sources and local nfs directories
+ testmkd /mnt/var/lib/nfs/state
config_portmap
fi
fi
@@ -469,7 +470,8 @@ if [ -n "$scratch" -a -z "$tmpisdisk" ] ; then
*)
tmpserv=$(uri_token $scratch server)
tmppath=$(uri_token $scratch path)
- # fixme - use nfsmnt and pass info on rw
+ # hanging mount processes might stop further setup - timeout
+ # should be configured ...
mount -t nfs -o rw,nolock,intr,nodev,soft,timeo=2,nosuid \
${tmpserv}:${tmppath} /tmp/scratch >/dev/null 2>&1 && {
mkdir -p /tmp/scratch/${clientip} >/dev/null 2>&1
@@ -555,11 +557,9 @@ $0: $date\n:0 local X :0 vt07\n" >/mnt/etc/X11/xdm/Xservers
resmgr revoke nobody
resmgr logout tty7
killall X" >/mnt/var/X11R6/bin/kiosk
- # early start of kiosk session if not late_dm is set
- if [ "x$late_dm" != "xyes" ] ; then
- echo -e "\t# kiosk start added by $0\n\t\
+ # early start of kiosk session
+ echo -e "\t# kiosk start added by $0\n\t\
/var/X11R6/bin/kiosk &>/dev/null &" >>/mnt/etc/${D_INITDIR}/boot.slx
- fi
cp /etc/startgui /mnt/var/X11R6/bin
chmod a+x /mnt/var/X11R6/bin/kiosk /mnt/var/X11R6/bin/startgui
rm /mnt/var/run/kiosk 2>/dev/null
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions
index 8b4a0ee5..5a65ff88 100644
--- a/initramfs/initrd-stuff/etc/functions
+++ b/initramfs/initrd-stuff/etc/functions
@@ -202,7 +202,7 @@ local program="$1"
local s4path
local notfound=1
for s4path in bin sbin usr/bin usr/sbin usr/local/bin \
- usr/local/sbin usr/bin/X11; do
+ usr/local/sbin usr/bin/X11; do
if [ -f "/mnt/$s4path/$program" ] && \
[ -x "/mnt/$s4path/$program" ]; then
printf '%s\n' "/$s4path/$program"
@@ -214,7 +214,7 @@ return $notfound
}
#############################################################################
# disk formatter and mounter. some proper error message output should be
-# added
+# added. It uses programs invoked from stage 4 root filesystem
diskfm () {
local target=$1
local fs
@@ -319,7 +319,7 @@ case $dhcp in
udhcpc -b -q $vci -s /usr/share/udhcpc/default.script -i $nwif 2>/dev/null
;;
esac
-echo "dhcp finished at $(sysup)" > /tmp/dhcp-done
+echo "dhcp finished at $(sysup)" >/tmp/dhcp-done
}
#############################################################################
@@ -343,7 +343,7 @@ else
fi
}
fileget () {
-# get type of tftp available, alternatively use wget for ftp or http
+# normally tftp would be used, alternatively use wget for ftp or http
# if local device file is specified - mount and unmount after copying
local cfgfile
[ "x$fileprot" = "x" ] && fileprot=tftp
@@ -372,8 +372,8 @@ if [ "x$filepath" != "x" ] ; then
esac
else
# predefined value for openslx environment; it is expected that this
- # directory is just below the tftpboot/tftproot (path to which the
- # daemon is restricted to)
+ # directory is just below the tftpboot (path to which the daemon is
+ # restricted to)
filepath="client-config"
[ "x$fileserv" = "x" ] && fileserv=$(checkip ${serverip})
# try to get configuration files successively; start with distro client
@@ -457,7 +457,7 @@ strinstr (){
}
#############################################################################
-# simple string in file search
+# simple string in file search, for the future grep should be used instead
strinfile (){
case "$(cat $2)" in *$1*) return 0;; esac
return 1
@@ -499,7 +499,7 @@ for ldcfg in /mnt/sbin/ldconfig \
test -x $ldcfg && {
$ldcfg -r /mnt -C $cachefile; break; }
done
-echo "finished at $(sysup)" > /tmp/ldcfg
+echo "finished at $(sysup)" >/tmp/ldcfg
}
#############################################################################
@@ -529,7 +529,7 @@ waitfor /tmp/dhcp-done 10000 || error "$error_errdcfg" nonfatal
waitfor /tmp/file-done 10000 || error "$error_errfcfg" nonfatal
waitfor /tmp/ldap-done 10000 || error "$error_errlcfg" nonfatal
# concatenate the different files now into the central config file, order
-# matters - ldap data has highest priority
+# matters - ldap (not implemented yet) data has highest priority
if ! test -f /tmp/cfgcomplete ; then
for config in /etc/initramfs-setup /tmp/confviadhcp /tmp/confviafile \
/tmp/confvialdap
@@ -882,10 +882,12 @@ include_in_fsroot_union () {
esac
if [ "X$union_type" == "XUnionFS" ]; then
[ "$DEBUGLEVEL" -gt 2 -a "$DEBUGLEVEL" != 8 ] && \
- echo "Using unionctl to mount ${root_path}_${union_id} (type: $union_type)"
+ echo "Using unionctl to mount ${root_path}_${union_id} (type: \
+ $union_type)"
unionctl /mnt/ --add --after 1 --mode ro /mnt/tmp/${root_path}_${union_id}
elif [ "X$union_type" == "XAUFS" ]; then
- # unionctl for aufs is a sh script needing tools not included in our initrd
+ # unionctl for aufs is a sh script needing tools not included in our
+ # initramfs
[ "$DEBUGLEVEL" -gt 2 -a "$DEBUGLEVEL" != 8 ] && \
echo "Using aufs-mount to mount ${root_path}_${union_id} (type: $union_type)"
mount -n -o remount,add:1:/mnt/tmp/${root_path}_${union_id}=ro none /mnt
@@ -993,8 +995,8 @@ WallpaperMode=NoWallpaper" \
#############################################################################
# dummy functions - avoid undefined functions in servconfig (functions are
-# normally overwritten by settings within distro-functions - a file generated
-# by slxmkramfs from <distro>/functions-default & ~-version
+# normally overwritten by settings within distro-functions) - a file
+# generated by mkdxsinitrd from <distro>/functions-default & ~-version
# find out if prerequisites for special X server modules are met (distro
# specific) and enable tvout if required
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init
index 6a4884fb..c971f8c1 100755
--- a/initramfs/initrd-stuff/init
+++ b/initramfs/initrd-stuff/init
@@ -739,7 +739,7 @@ chown 65534:0 /mnt/var/lib/nobody
# /proc/bus/usb might be deprecated in newer kernels ...
echo -e "# /etc/fstab - file generated by $0 (initramfs from $date)\n#\
\tDirk von \
-Suchodoletz, dirk@goe.net\n\nrootfs\t\t/\t\trootfs\t\tro\t\t 0 0\n\
+Suchodoletz, dvs@openslx.com\n\nrootfs\t\t/\t\trootfs\t\tro\t\t 0 0\n\
proc\t\t/proc\t\tproc\t\tdefaults\t 0 0\ninitramdevs\t/dev\t\ttmpfs\
\t\trw\t\t 0 0\ndevpts\t\t/dev/pts\tdevpts\t\tmode=0620,gid=5\t 0 0" \
>/mnt/etc/fstab || error "$init_fstab"