[Fai-commit] r3410 - trunk/bin
fai-repository at svn.debian.org
fai-repository at svn.debian.org
Sat Apr 15 21:27:51 UTC 2006
Author: lange
Date: 2006-04-15 21:27:50 +0000 (Sat, 15 Apr 2006)
New Revision: 3410
Modified:
trunk/bin/fai
Log:
move some code outside fai_init
Modified: trunk/bin/fai
===================================================================
--- trunk/bin/fai 2006-04-15 18:42:42 UTC (rev 3409)
+++ trunk/bin/fai 2006-04-15 21:27:50 UTC (rev 3410)
@@ -76,11 +76,6 @@
exit 1
}
- # HG: are we called as an init substitute ?
- DO_INIT_TASKS=0
- [ "$0" = "/etc/init.d/rcS" ] && DO_INIT_TASKS=1
- [ $DO_INIT_TASKS -eq 1 ] && renewclass=1 # always renew class list when installing
-
DEBIAN_FRONTEND=noninteractive
# local disks are mounted to $FAI_ROOT
if [ -z "$FAI_ROOT" ] ; then
@@ -91,18 +86,6 @@
# no chroot needed
[ "$FAI_ROOT" = '/' ] && ROOTCMD=
- # Solaris has already a writable /tmp directory
- [ "$oclass" = LINUX -a $DO_INIT_TASKS -eq 1 ] && create_ramdisk
-
- # directory where temporary log files are stored
- # set default value if nothing is set in fai.conf
- if [ -z "$LOGDIR" -a $DO_INIT_TASKS -eq 1 ]; then
- LOGDIR=/tmp/fai
- mkdir -p $LOGDIR
- fi
- [ $DO_INIT_TASKS -eq 0 ] && LOGDIR=$(mktemp -t -d fai.XXXXXX)
- ln -s $LOGDIR $rundir/current_log
-
# several log files
diskvar=$LOGDIR/disk_var.sh
rcslog=$LOGDIR/fai.log
@@ -215,6 +198,23 @@
exit 2
fi
+ # HG: are we called as an init substitute ?
+ export DO_INIT_TASKS=0
+ [ "$0" = "/etc/init.d/rcS" ] && DO_INIT_TASKS=1
+ [ $DO_INIT_TASKS -eq 1 ] && renewclass=1 # always renew class list when installing
+
+ # Solaris has already a writable /tmp directory
+ [ "$oclass" = LINUX -a $DO_INIT_TASKS -eq 1 ] && create_ramdisk
+
+ # directory where temporary log files are stored
+ # set default value if nothing is set in fai.conf
+ if [ -z "$LOGDIR" -a $DO_INIT_TASKS -eq 1 ]; then
+ export LOGDIR=/var/log/fai/current-log
+ mkdir -p $LOGDIR
+ fi
+ [ $DO_INIT_TASKS -eq 0 ] && LOGDIR=$(mktemp -t -d fai.XXXXXX)
+ ln -s $LOGDIR $rundir/current_log
+
fai_init
lpipe=$LOGDIR/logfifo
More information about the Fai-commit
mailing list