[Fai-commit] r4106 - in people/siretart/ubuntu: . bin conf debian
lib man
fai-commit at lists.alioth.debian.org
fai-commit at lists.alioth.debian.org
Sat Oct 21 08:34:47 UTC 2006
Author: siretart-guest
Date: 2006-10-21 08:34:46 +0000 (Sat, 21 Oct 2006)
New Revision: 4106
Modified:
people/siretart/ubuntu/Makefile
people/siretart/ubuntu/VERSION
people/siretart/ubuntu/bin/fai
people/siretart/ubuntu/bin/fai-cd
people/siretart/ubuntu/bin/faireboot
people/siretart/ubuntu/bin/fcopy
people/siretart/ubuntu/bin/install_packages
people/siretart/ubuntu/bin/make-fai-nfsroot
people/siretart/ubuntu/conf/fai.conf
people/siretart/ubuntu/debian/NEWS
people/siretart/ubuntu/debian/changelog
people/siretart/ubuntu/lib/create_ramdisk
people/siretart/ubuntu/lib/get-config-dir
people/siretart/ubuntu/lib/get-config-dir-cvs
people/siretart/ubuntu/lib/get-config-dir-svn
people/siretart/ubuntu/lib/subroutines
people/siretart/ubuntu/lib/subroutines-linux
people/siretart/ubuntu/lib/updatebase
people/siretart/ubuntu/man/fai.8
people/siretart/ubuntu/man/make-fai-nfsroot.8
Log:
update to fai 3.1, merging ubuntu customisation
Modified: people/siretart/ubuntu/Makefile
===================================================================
--- people/siretart/ubuntu/Makefile 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/Makefile 2006-10-21 08:34:46 UTC (rev 4106)
@@ -1,7 +1,7 @@
+include VERSION
SHELL=/bin/bash
-include VERSION
-
+SHELL=/bin/bash
DESTDIR=$(shell pwd)/debian/tmp
export DOCDIR = $(shell pwd)/debian/fai-doc/usr/share/doc/fai-doc
LIBDIR = $(DESTDIR)/usr/lib/fai
Modified: people/siretart/ubuntu/VERSION
===================================================================
--- people/siretart/ubuntu/VERSION 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/VERSION 2006-10-21 08:34:46 UTC (rev 4106)
@@ -1,4 +1,4 @@
VERSIONSTRING="$(shell perl -e 'while (<>) { /^(\S+).*\((.*)\)/ and print uc($$1) . " $$2, "; if (/ --.*,\s+(.*)\s\d+:/) { print "$$1" ; exit } }' $(SRCDIR)debian/changelog)"
# in several files the string _KERNELVERSION_ will be replaced by the
# value of KERNELVERSION
-KERNELVERSION=2.6.17.11-ubuntu1
+KERNELVERSION=2.6.17.13-ubuntu1
Modified: people/siretart/ubuntu/bin/fai
===================================================================
--- people/siretart/ubuntu/bin/fai 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/bin/fai 2006-10-21 08:34:46 UTC (rev 4106)
@@ -80,6 +80,13 @@
[ "$FAI_ROOT" = '/' ] && ROOTCMD=
target=$FAI_ROOT
+ if [ X$action = Xdirinstall -a -n "$newhostname" ]; then
+ HOSTNAME=$newhostname
+ HOST=$newhostname
+ unset newhostname
+ echo "Hostname set to $HOST" | tee -a $LOGDIR/fai.log
+ fi
+
if [ $do_init_tasks -eq 1 ]; then
trap 'echo "Now rebooting";faireboot' INT QUIT
else
@@ -97,6 +104,7 @@
mount -t sysfs sysfs /sys
[ -d /var/run/network ] || mkdir /var/run/network
+ [ -d /dev/shm/network ] || mkdir /dev/shm/network # when using initrd kernels
ifup lo
# we really need to start udev
[ -x /etc/init.d/udev ] && /etc/init.d/udev start
@@ -150,7 +158,7 @@
# Main routine
# Parse commandline options
-TEMP=$(getopt -o Nhvc:C: --long new,help,verbose,class:,cfdir: -n "$0" -- "$@")
+TEMP=$(getopt -o u:Nhvc:C: --long new,help,verbose,class:,cfdir: -n "$0" -- "$@")
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
# Note the quotes around `$TEMP': they are essential!
eval set -- "$TEMP"
@@ -186,6 +194,10 @@
shift
cmdlineclasses=${cmdlineclasses//,/ }
;;
+ -u|--hostname)
+ shift
+ export newhostname=$1
+ ;;
--)
shift
break
@@ -210,9 +222,9 @@
# override FAI_ACTION later if a command line argument is given
[ "$1" ] && action=$1
-[ "$2" ] && export FAI_ROOT=$2 # only used for dirinst
+[ "$2" ] && export FAI_ROOT=$2 # only used for dirinstall
-if [ X$action = Xdirinst ]; then
+if [ X$action = Xdirinstall ]; then
if [ -z "$FAI_ROOT" ]; then
echo "Please specify a target directory. Aborted"
exit 3
@@ -252,7 +264,7 @@
fi
fai_init
-if [ X$action = Xdirinst ]; then
+if [ X$action = Xdirinstall ]; then
skiptask confdir
export FAI=$FAI_CONFIGDIR
set -a
Modified: people/siretart/ubuntu/bin/fai-cd
===================================================================
--- people/siretart/ubuntu/bin/fai-cd 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/bin/fai-cd 2006-10-21 08:34:46 UTC (rev 4106)
@@ -30,7 +30,7 @@
#*********************************************************************
set -e
-version="fai-cd 2.4.2, 15 september 2006"
+version="fai-cd 2.4.3, 6 october 2006"
burn=0
hidedirs="/usr/share/locale /usr/share/doc /var/lib/apt /var/cache/apt /usr/share/man /var/lib/dpkg/info /media/mirror/aptcache /media/mirror/.apt-move"
@@ -118,7 +118,7 @@
set +e
local d
- local dirs="boot $FAI media/mirror etc/fai/apt/sources.list"
+ local dirs="boot $FAI media/mirror etc/apt/sources.list"
for d in $dirs; do
umount $NFSROOT/$d 2>/dev/null
done
@@ -152,7 +152,7 @@
echo "deb file:/media/mirror $i $comp" >> $tmp1
done
- mount --bind $tmp1 $NFSROOT/etc/fai/apt/sources.list
+ mount --bind $tmp1 $NFSROOT/etc/apt/sources.list
customize_nfsroot
echo "Writing FAI CD-ROM image to $isoname. This may need some time."
mkisofs -V "$vname" -A "$aname" -log-file /dev/null -quiet -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -c boot.catalog -o $isoname $NFSROOT || die 12 "mkisofs failed."
Modified: people/siretart/ubuntu/bin/faireboot
===================================================================
--- people/siretart/ubuntu/bin/faireboot 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/bin/faireboot 2006-10-21 08:34:46 UTC (rev 4106)
@@ -27,7 +27,7 @@
umount -ar
killall udevd
-sndmon "FAIREBOOT"
+sendmon "FAIREBOOT"
echo "$HOSTNAME now rebooting"
if [ "X" == "X$SSH_CLIENT" -a "$TERM" != "dumb" ]; then
Modified: people/siretart/ubuntu/bin/fcopy
===================================================================
--- people/siretart/ubuntu/bin/fcopy 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/bin/fcopy 2006-10-21 08:34:46 UTC (rev 4106)
@@ -27,7 +27,7 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#*********************************************************************
-my $version = "Version 2.2.6, 23-july-2006";
+my $version = "Version 2.2.7, 10-october-2006";
use strict;
use File::Copy;
@@ -180,8 +180,8 @@
(-d $bpath or _mkpath($bpath,$debug,0755)) and _move($destfile,$backupfile));
if (_copy($tmpfile,$destfile)) {
print "fcopy: copied $sourcefile to $destfile\n" ;
+ set_mode($ps,$destfile,$class);
runscript("postinst",$ps,$destfile,$class);
- set_mode($ps,$destfile,$class);
} else {
ewarn("copy $sourcefile to $destfile failed. $!") ;
}
Modified: people/siretart/ubuntu/bin/install_packages
===================================================================
--- people/siretart/ubuntu/bin/install_packages 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/bin/install_packages 2006-10-21 08:34:46 UTC (rev 4106)
@@ -25,7 +25,7 @@
# MA 02111-1307, USA.
#*********************************************************************
-my $version = "Version 3.4, 4-sep-2006";
+my $version = "Version 3.4.1, 10-oct-2006";
$0=~ s#.+/##; # remove path from program name
# import variables: $verbose, $MAXPACKAGES, $classes, $FAI, $FAI_ROOT
@@ -154,9 +154,9 @@
my $packlist = join(' ',@{$list{$atype}});
- if ($atype =~ /rpm|yum|y2?|yum|rpmr/) {
+ if ($atype =~ /rpm|yum|y2/) {
$command{clean} = "true"; # do not cal apt-get lcean for rpm and yum packages
- execute("$rootcmd $command{$atype}") if $packlist;
+ execute("$rootcmd $command{$atype} $packlist") if $packlist;
next;
}
Modified: people/siretart/ubuntu/bin/make-fai-nfsroot
===================================================================
--- people/siretart/ubuntu/bin/make-fai-nfsroot 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/bin/make-fai-nfsroot 2006-10-21 08:34:46 UTC (rev 4106)
@@ -55,6 +55,7 @@
f) die "Option -f is not supported any more. Use option -c instead" ;;
k) kinstall=1 ;;
K) kremove=1; kinstall=1 ;;
+ h) usage ;;
e) expert=1 ;;
?) exit 5 ;; # error in option parsing
esac
@@ -236,8 +237,8 @@
[ -d $NFSROOT/var/state ] || mkdir $NFSROOT/var/state
cp -a $cfdir/apt $NFSROOT/etc
- ainsl -a $NFSROOT/etc/hosts "127.0.0.1 localhost"
- ainsl $NFSROOT/etc/hosts "$NFSROOT_ETC_HOSTS"
+ ainsl -as $NFSROOT/etc/hosts "127.0.0.1 localhost"
+ ainsl $NFSROOT/etc/hosts "$NFSROOT_ETC_HOSTS"
add_all_host_entries
# we need these option before installing the first package. So we
@@ -261,6 +262,7 @@
rm etc/mtab dev/MAKEDEV
ln -s /proc/mounts etc/mtab
[ -d "var/lib/discover" ] || mkdir var/lib/discover
+ [ -d "var/discover" ] || mkdir var/discover
mkdir etc/sysconfig tmp/etc
cp -p /etc/resolv.conf tmp/etc # so we have DNS after chroot $NFSROOT on the install server
ln -sf /tmp/etc/resolv.conf etc/resolv.conf
@@ -417,6 +419,19 @@
fi
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+usage() {
+
+ cat <<-EOF
+ Copyright (C) 1999-2006 Thomas Lange
+ Report bugs to <fai at informatik.uni-koeln.de>.
+
+ Usage: make-fai-nfsroot [OPTIONS]
+ Create an NFSROOT for FAI.
+ Read the man pages pages make-fai-nfsroot(8).
+EOF
+ exit 0
+}
+# - - - - - - - - - - - - - - - - - - - - - - - - - -
# main routine
[ -z "$KERNELPACKAGE" ] && die "\$KERNELPACKAGE is not set. Aborting."
Modified: people/siretart/ubuntu/conf/fai.conf
===================================================================
--- people/siretart/ubuntu/conf/fai.conf 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/conf/fai.conf 2006-10-21 08:34:46 UTC (rev 4106)
@@ -24,6 +24,7 @@
# how to access the fai config space
# default if undefined here: nfs://`hostname`/$FAI_CONFIGDIR
+# supported URL-types: nfs, file, cvs, cvs+ssh, svn+file, svn+http,...
#FAI_CONFIG_SRC=nfs://yourservername$FAI_CONFIGDIR
# the following variables are read only for most users
Modified: people/siretart/ubuntu/debian/NEWS
===================================================================
--- people/siretart/ubuntu/debian/NEWS 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/debian/NEWS 2006-10-21 08:34:46 UTC (rev 4106)
@@ -1,3 +1,9 @@
+fai (3.1) unstable; urgency=medium
+
+ - rename action dirinst to dirinstall
+
+ -- Thomas Lange <lange at debian.org> Wed, 27 Sep 2006 14:41:11 +0200
+
fai (3.0) unstable; urgency=low
- WARNING: the fai-guide does not yet reflect the changes from FAI 2 to FAI 3
Modified: people/siretart/ubuntu/debian/changelog
===================================================================
--- people/siretart/ubuntu/debian/changelog 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/debian/changelog 2006-10-21 08:34:46 UTC (rev 4106)
@@ -1,12 +1,35 @@
-fai (3.0ubuntu1) edgy; urgency=low
+fai (3.1ubuntu) edgy; urgency=low
- * add SHELL=/bin/bash to top level makefile.
- ubuntu uses /bin/sh -> /bin/dash by default
- * patch for fai-start-stop-daemon taken from Thomas Lange
- * prefer sysvinit over upstart for fai-make-nfs-root
+ * merge FAI 3.1 changes. All necessary ubuntu hacks have been
+ incorporated by upstream (thanks Thomas).
+ * changes to default configuration to make a usable ubuntu installation
+ - point to archive.ubuntu.com instead of ftp.debian.org
+ - use sysvinit instead of upstart, because its default bootlog behavior
- -- Reinhard Tartler <siretart at tauware.de> Fri, 6 Oct 2006 23:21:40 +0200
+ -- Reinhard Tartler <siretart at tauware.de> Sat, 21 Oct 2006 10:30:18 +0200
+fai (3.1) unstable; urgency=low
+
+ * Makefile: force bash in Makefile, fixes FTBFS in ubuntu
+ * rename action dirinst to dirinstall (closes: #390345)
+ * fai-cd: fix wrong path for sources.list (closes: #391639)
+ * scripts/FAIBASE/10-misc: use ainsl instead of echo >> ...
+ * lib/create_ramdisk: make /var/discover writeable
+ * make-fai-nfsroot: create directory var/discover
+ * subroutines: move find's maxdepth option to the left, prevent multiple
+ fai softupdate running simultaneously (closes: #390680)
+ * get-config-dir*: replace \s and \S in expr with regex using [:space:],
+ so it also works for sarge's version of expr
+ * subroutines-liux: add test if base.tgz exists (closes: #390343),
+ sources.list must be used from /etc/apt during normal installation
+ * fai: add option -u,--hostname (closes: #390367)
+ * LAST/5-misc: do not fail if hardware clock can't be set
+ * fcopy: swap call of postinst and set_mode
+ * install_packages: add missing package list to yum and rpm calls
+ (closes: #392032)
+
+ -- Thomas Lange <lange at debian.org> Tue, 10 Oct 2006 01:29:35 +0200
+
fai (3.0) unstable; urgency=low
* conf/make-fai-nfsroot.conf,sources.list: move from sarge to etch
Modified: people/siretart/ubuntu/lib/create_ramdisk
===================================================================
--- people/siretart/ubuntu/lib/create_ramdisk 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/lib/create_ramdisk 2006-10-21 08:34:46 UTC (rev 4106)
@@ -20,5 +20,5 @@
}
mkdir -p /tmp/etc /tmp/target
-mkrw -n /dev /var/run /var/log /var/lock /var/lib/discover /etc/sysconfig /etc/lvm
+mkrw -n /dev /var/run /var/log /var/lock /var/discover /var/lib/discover /etc/sysconfig /etc/lvm
mkrw -n /var/lib/cfengine2 /var/lib/heartbeat
Modified: people/siretart/ubuntu/lib/get-config-dir
===================================================================
--- people/siretart/ubuntu/lib/get-config-dir 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/lib/get-config-dir 2006-10-21 08:34:46 UTC (rev 4106)
@@ -10,7 +10,7 @@
### END SUBROUTINE INFO
if [ -z "$FAI_CONFIG_SRC" ]; then
- sndmon "TASKERROR get_fai_dir 21"
+ sendmon "TASKERROR get_fai_dir 21"
die "Error: Provide the URL to obtain the fai config storage in \$FAI_CONFIG_SRC"
fi
@@ -26,7 +26,7 @@
if which get-config-dir-$method &>/dev/null ; then
get-config-dir-$method
else
- sndmon "TASKERROR get_fai_dir 22"
+ sendmon "TASKERROR get_fai_dir 22"
die "Error: get-config-dir-"$method "not found"
fi
Modified: people/siretart/ubuntu/lib/get-config-dir-cvs
===================================================================
--- people/siretart/ubuntu/lib/get-config-dir-cvs 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/lib/get-config-dir-cvs 2006-10-21 08:34:46 UTC (rev 4106)
@@ -12,8 +12,8 @@
# matched string: "cvs[+ssh]://user at host/path/to/cvsroot module[=tag]"
# dir contains user at host/path/to/cvsroot
protocol=$(expr match "$FAI_CONFIG_SRC" '\([^:]*\)://')
-dir=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\(\S\+\)\s\+')
-module=$(expr match "$FAI_CONFIG_SRC" '[^:]*://.*\s\+\([^=]*\)')
+dir=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\([^[:space:]]\+\)[[:space:]]\+')
+module=$(expr match "$FAI_CONFIG_SRC" '[^:]*://.*[[:space:]]\+\([^=]*\)')
tag=$(expr match "$FAI_CONFIG_SRC" '=\([^=]*\)')
case $protocol in
Modified: people/siretart/ubuntu/lib/get-config-dir-svn
===================================================================
--- people/siretart/ubuntu/lib/get-config-dir-svn 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/lib/get-config-dir-svn 2006-10-21 08:34:46 UTC (rev 4106)
@@ -12,7 +12,7 @@
# matched string: "svn://user@host/svnpath"
protocol=$(expr match "$FAI_CONFIG_SRC" '\([^:]*\)://')
username=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\([^@]*\)@')
-svnpath=$(expr match "$FAI_CONFIG_SRC" '[^:]*://[^@]\+@\(\S\+\)')
+svnpath=$(expr match "$FAI_CONFIG_SRC" '[^:]*://[^@]\+@\([^[:space:]]\+\)')
case $protocol in
svn)
Modified: people/siretart/ubuntu/lib/subroutines
===================================================================
--- people/siretart/ubuntu/lib/subroutines 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/lib/subroutines 2006-10-21 08:34:46 UTC (rev 4106)
@@ -112,13 +112,13 @@
# skip task
rm $LOGDIR/skip.$taskname # TODO: remove skip files at the very end
[ "$verbose" ] && echo "Skiping task_$taskname"
- sndmon "TASKSKIP $taskname"
+ sendmon "TASKSKIP $taskname"
else
echo "Calling task_$taskname"
- sndmon "TASKBEGIN $taskname"
+ sendmon "TASKBEGIN $taskname"
task_error=0 # task can set this variable to indicate an error
task_$taskname
- sndmon "TASKEND $taskname $task_error"
+ sendmon "TASKEND $taskname $task_error"
fi
# since the subroutine is not needed any more, we can undefine it
unset task_$taskname
@@ -148,14 +148,14 @@
fi
if [ -x $hfile ]; then
echo "Calling hook: $hook.$cl"
- sndmon "HOOK $hook.$cl"
+ sendmon "HOOK $hook.$cl"
# execute the hook
$hfile $dflag
check_status $hook.$cl $?
fi
if [ -x $hfile.source ]; then
echo "Source hook: $hook.$cl.source"
- sndmon "HOOK $hook.$cl.source"
+ sendmon "HOOK $hook.$cl.source"
# source this hook
. $hfile.source $dflag
check_status $hook.$cl.source $?
@@ -240,7 +240,7 @@
if [ -z "$FAI_ACTION" ]; then
echo "No action in \$FAI_ACTION defined."
- sndmon "TASKERROR action 21"
+ sendmon "TASKERROR action 21"
task_faiend
exit
fi
@@ -259,9 +259,9 @@
task install
task faiend
;;
- dirinst)
+ dirinstall)
echo "Installing into directory $FAI_ROOT"
- task dirinst
+ task dirinstall
;;
softupdate)
echo Performing FAI system update. All data may be overwritten!
@@ -279,7 +279,7 @@
$FAI/hooks/$FAI_ACTION
else
echo "ERROR: User defined action $FAI/hooks/$FAI_ACTION not found."
- sndmon "TASKERROR action 22"
+ sendmon "TASKERROR action 22"
task_faiend
fi
;;
@@ -296,9 +296,9 @@
task_defclass() {
if [ ! -d $FAI/class ]; then
- sndmon "TASKERROR defclass 21"
+ sendmon "TASKERROR defclass 21"
echo "Directory $FAI/class not found. Following subdirectories are found:"
- find $FAI -type d -maxdepth 1 -printf "%p\n"
+ find $FAI -maxdepth 1 -type d -printf "%p\n"
die "Aborting."
fi
@@ -397,7 +397,7 @@
# reboot without prompting if FAI_FLAG reboot is set
[ "$flag_reboot" -lt "1" ] && read
echo "Rebooting $HOSTNAME now"
- sndmon REBOOT
+ sendmon REBOOT
cd /
sync
@@ -405,7 +405,7 @@
if [ -f /boot/RUNNING_FROM_FAICD ]; then
cat > $target/tmp/rebootCD <<'EOF'
#! /bin/bash
-device=$1
+ device=$1
eject -m /dev/$device 2>/dev/null >/dev/null
echo "Remove CDROM and press <RETURN> to continue reboot"
read
@@ -453,12 +453,12 @@
if [ -f $stamp ]; then
echo "Error while executing commands in subshell."
echo "$stamp was not removed."
- sndmon "TASKERROR install 21"
+ sendmon "TASKERROR install 21"
die "Please look at the log files in $LOGDIR for errors."
fi
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-task_dirinst() {
+task_dirinstall() {
> $stamp
@@ -480,7 +480,7 @@
if [ -f $stamp ]; then
echo "Error while executing commands in subshell."
echo "$stamp was not removed."
- sndmon "TASKERROR install 21"
+ sendmon "TASKERROR install 21"
die "Please look at the log files in $LOGDIR for errors."
fi
}
@@ -489,7 +489,14 @@
local stamp=/var/run/fai/fai_softupdate_is_running
+ [ -f "$stamp" ] && die "Another fai softupdate is already running. Aborting."
> $stamp
+ # if the system had been installed using fai < 3.0 disk_var.sh is found in /etc/fai
+ if [ ! -f /var/lib/fai/disk_var.sh -a -f /etc/fai/disk_var.sh ] ; then
+ mv /etc/fai/disk_var.sh /var/lib/fai/
+ fi
+ # the following copy operation is required to make $LOGDIR a reliable source
+ # for disk_var.sh
cp -p /var/lib/fai/disk_var.sh $LOGDIR # use the last disk_var during update
defnop wait_for_jobs
@@ -511,7 +518,7 @@
if [ -f $stamp ]; then
echo "Error while executing commands in subshell."
echo "$stamp was not removed."
- sndmon "TASKERROR softupdate 21"
+ sendmon "TASKERROR softupdate 21"
die "Please look at the log files in $LOGDIR for errors."
fi
umount $FAI_ROOT/fai
Modified: people/siretart/ubuntu/lib/subroutines-linux
===================================================================
--- people/siretart/ubuntu/lib/subroutines-linux 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/lib/subroutines-linux 2006-10-21 08:34:46 UTC (rev 4106)
@@ -45,7 +45,7 @@
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### BEGIN SUBROUTINE INFO
-# Provides-Var: $faimond $sndhostname
+# Provides-Var: $faimond $sendhostname
# Requires-Var: $LOGDIR $FAI
# Suggests-Var: $monserver
# Short-Description: <task desc.>
@@ -81,8 +81,8 @@
# check if monitor server is available
[ -z "$monserver" ] && monserver=$SERVER
faimond=1
- sndhostname=$HOSTNAME # save current hostname
- if sndmon check; then
+ sendhostname=$HOSTNAME # save current hostname
+ if sendmon check; then
echo "Monitoring to server $monserver enabled."
else
faimond=0
@@ -103,7 +103,7 @@
# setup_harddisks must create $LOGDIR/disk_var.sh file
if [ ! -s $LOGDIR/disk_var.sh ]; then
cat $LOGDIR/format.log
- sndmon "TASKERROR partition 21"
+ sendmon "TASKERROR partition 21"
die "setup_harddisks did not create $LOGDIR/disk_var.sh file."
fi
# now define variable for root and boot partition and boot device
@@ -127,6 +127,7 @@
[ -d $FAI/basefiles ] && ftar -1v -s $FAI/basefiles /
if [ $? -ne 0 ]; then
[ $do_init_tasks -eq 0 ] && basefile=$NFSROOT/var/tmp/base.tgz
+ [ -f $basefile ] || die "$basefile not found. Can't extract it. Aborting."
# extract the tar file which was the result of debootstrap
echo "Extracting $NFSROOT/var/tmp/base.tgz"
gzip -dc $basefile | tar -C $FAI_ROOT -xpf -
@@ -151,7 +152,7 @@
if mount $romountopt $FAI_DEBMIRROR $FAI_ROOT/$MNTPOINT; then
[ "$debug" ] && echo "Mirror mounted from $FAI_DEBMIRROR to $FAI_ROOT/$MNTPOINT"
else
- sndmon "TASKERROR mirror $?"
+ sendmon "TASKERROR mirror $?"
die "Can't mount $FAI_DEBMIRROR"
fi
}
@@ -193,6 +194,8 @@
Aptitude::CmdLine::Ignore-Trust-Violations yes;
EOF
fi
+ # during normal installation, we need sources.list from /etc/apt
+ [ $do_init_tasks -eq 1 ] && FAI_ETC_DIR=/etc
[ -d $FAI_ETC_DIR/apt ] && cp -r $FAI_ETC_DIR/apt/* $FAI_ROOT/etc/apt/
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -276,11 +279,11 @@
fi
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-sndmon() {
+sendmon() {
# send message to monitor daemon
[ "$faimond" -eq 0 ] && return 0
- echo "$sndhostname $*" | nc $monserver 4711 2>/dev/null
+ echo "$sendhostname $*" | nc $monserver 4711 2>/dev/null
return $?
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Modified: people/siretart/ubuntu/lib/updatebase
===================================================================
--- people/siretart/ubuntu/lib/updatebase 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/lib/updatebase 2006-10-21 08:34:46 UTC (rev 4106)
@@ -1,7 +1,6 @@
#! /bin/bash
-# TODO: execute this when doing dirinst
-if [ "$FAI_ACTION" = "install" -o "$FAI_ACTION" = "dirinst" ]; then
+if [ "$FAI_ACTION" = "install" -o "$FAI_ACTION" = "dirinstall" ]; then
# some packages must access /proc even in chroot environment
mount -t proc proc $FAI_ROOT/proc
# some packages must access /sys even in chroot environment
Modified: people/siretart/ubuntu/man/fai.8
===================================================================
--- people/siretart/ubuntu/man/fai.8 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/man/fai.8 2006-10-21 08:34:46 UTC (rev 4106)
@@ -1,5 +1,5 @@
.\" Hey, EMACS: -*- nroff -*-
-.TH fai 8 "27 september 2006" "FAI 3"
+.TH fai 8 "10 october 2006" "FAI 3.1"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -19,7 +19,7 @@
.RI [ options ] " ACTION"
.br
.B fai
-.RI [ options ] " dirinst DIRECTORY"
+.RI [ options ] " dirinstall DIRECTORY"
.SH DESCRIPTION
fai starts a fai-action, e.g. an installation or a softupdate.
If the variable FAI_ACTION is defined, this action will be
@@ -102,7 +102,7 @@
.RE
.TP
-.B dirinst [DIR]
+.B dirinstall [DIR]
Installation into a directory. This is nearly the same as action
install except for skipping the task that partitions the hard disks and
creates the file systems. Classes should be defined with option -c.
@@ -112,7 +112,7 @@
certainly destroy it.
.SH EXAMPLES
- fai -v dirinst /srv/etchroot -cDEFAULT,FAIBASE,LAST
+ fai -v dirinstall /srv/etchroot -cDEFAULT,FAIBASE,LAST
This command will do an installation into the directory
/src/etchroot. For defining variables, selecting the software packages
Modified: people/siretart/ubuntu/man/make-fai-nfsroot.8
===================================================================
--- people/siretart/ubuntu/man/make-fai-nfsroot.8 2006-10-21 08:26:59 UTC (rev 4105)
+++ people/siretart/ubuntu/man/make-fai-nfsroot.8 2006-10-21 08:34:46 UTC (rev 4106)
@@ -41,7 +41,7 @@
Use CFDIR as configuration directory. Default is /etc/fai.
.TP
.B \-f config_file
-Not supported any more. Use option -c instead.
+Not supported any more. Use option -C instead.
.TP
.B \-K
Remove all kernels from NFSROOT, then install a new kernel into the nfsroot (like -k)
@@ -56,6 +56,9 @@
.B \-v
Create verbose output on stdout.
.TP
+.BI \-h
+Show simple help.
+.TP
.B \-r
Attempt to recover a previously failed run of this command.
More information about the Fai-commit
mailing list