[Fai-commit] r3823 - trunk/lib
fai-commit at lists.alioth.debian.org
fai-commit at lists.alioth.debian.org
Sun Sep 3 22:54:04 UTC 2006
Author: lange
Date: 2006-09-03 22:54:03 +0000 (Sun, 03 Sep 2006)
New Revision: 3823
Modified:
trunk/lib/subroutines
trunk/lib/subroutines-linux
Log:
all FAI_FLAGS are now defined as $flag_xxx with xxx is the flag name,
$verbose and $debug are also defined for backwards compability
unset flag_sshd and flag_createvt after use
Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines 2006-09-03 22:38:06 UTC (rev 3822)
+++ trunk/lib/subroutines 2006-09-03 22:54:03 UTC (rev 3823)
@@ -178,17 +178,19 @@
local flag
# FAI_FLAGS are comma separated, define all flags
FAI_FLAGS=${FAI_FLAGS//,/ }
- [ "$verbose" ] && echo "FAI_FLAGS: $FAI_FLAGS"
+ echo "FAI_FLAGS: $FAI_FLAGS"
for flag in $FAI_FLAGS; do
# define this flag as 1
- eval "$flag=1"
+ eval "\$flag_$flag=1"
done
+ [ "$flag_verbose" ] && verbose=1 # for backward compability
+ [ "$flag_debug" ] && debug=1 # for backward compability
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### BEGIN SUBROUTINE INFO
# Provides-Var: $FAI_RUNDATE
# Requires-Var: $DOMAIN $DO_INIT_TASKS
-# Suggests-Var: $createvt $sshd
+# Suggests-Var: $flag_createvt $flag_sshd
# Short-Description: <task desc.>
### END SUBROUTINE INFO
@@ -204,7 +206,7 @@
# set the system time and date using rdate or/and ntpdate
[ "$TIMESRVS_1" ] && rdate $TIMESRVS_1
[ "$NTPSRVS_1" ] && ntpdate -b -v $NTPSRVS
- [ "$createvt" ] && {
+ [ "$flag_createvt" ] && {
# create two virtual terminals; acces via alt-F2 and alt-F3
echo "Press ctrl-c to interrupt FAI and to get a shell"
openvt -c2 /bin/bash ; openvt -c3 /bin/bash
@@ -212,8 +214,9 @@
}
# start secure shell daemon for remote access
- [ "$sshd" -a -x /usr/sbin/sshd ] && /usr/sbin/sshd
+ [ "$flag_sshd" -a -x /usr/sbin/sshd ] && /usr/sbin/sshd
fi
+ unset flag_createvt flag_sshd
# when did FAI start, using localtime
FAI_RUNDATE=$(date +'%Y%m%d_%H%M%S')
@@ -381,7 +384,7 @@
wait_for_jobs
echo "Press <RETURN> to reboot or ctrl-c to execute a shell"
# reboot without prompting if FAI_FLAG reboot is set
- [ -z $reboot ] && read
+ [ -z $flag_reboot ] && read
echo "Rebooting $HOSTNAME now"
sndmon REBOOT
cd /
Modified: trunk/lib/subroutines-linux
===================================================================
--- trunk/lib/subroutines-linux 2006-09-03 22:38:06 UTC (rev 3822)
+++ trunk/lib/subroutines-linux 2006-09-03 22:54:03 UTC (rev 3823)
@@ -113,7 +113,7 @@
### BEGIN SUBROUTINE INFO
# Provides-Var: none
# Requires-Var: $FAI_ROOT $DO_INIT_TASKS $NFSROOT
-# Suggests-Var: $createvt $sshd $LOGDIR
+# Suggests-Var: $LOGDIR
# Short-Description: <task desc.>
### END SUBROUTINE INFO
More information about the Fai-commit
mailing list