[Fai-commit] r6636 - in trunk: bin man
Thomas Lange
lange at alioth.debian.org
Mon Aug 1 09:33:50 UTC 2011
Author: lange
Date: 2011-08-01 09:33:50 +0000 (Mon, 01 Aug 2011)
New Revision: 6636
Modified:
trunk/bin/make-fai-nfsroot
trunk/man/make-fai-nfsroot.8
Log:
remove recover function and option -r
Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot 2011-08-01 09:31:19 UTC (rev 6635)
+++ trunk/bin/make-fai-nfsroot 2011-08-01 09:33:50 UTC (rev 6636)
@@ -97,7 +97,7 @@
C) cfdir=$OPTARG ;;
B) basetgz=$OPTARG ;;
v) verbose=1 ; v=-v ;;
- r) recover=1 ;;
+ r) die 1 "Option -r is not supported any more." ;;
f) die 1 "Option -f is not supported any more. Use option -C instead" ;;
k) kinstall=1 ;;
K) kremove=1;;
@@ -146,10 +146,7 @@
NFSROOT="$NFSROOT/live/filesystem.dir"
ROOTCMD="chroot $NFSROOT"
-RUNDIR=/var/run/fai/make-fai-nfsroot
-mkdir -p $RUNDIR
export DEBIAN_FRONTEND=noninteractive
-[ "$recover" ] || rm -rf $RUNDIR/*
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bad_exit() {
@@ -158,16 +155,6 @@
echo "Please fix the error or try make-fai-nfsroot -v"
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-call_with_stamp() {
-
- local func=$1
- local stamp=$RUNDIR/$func
- # call subroutine
- [ "$recover" -a -f $stamp ] && return 0
- # make a stamp only on success.
- "$@" && : > $stamp
-}
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
call_verbose() {
if [ "$verbose" ]; then
@@ -280,7 +267,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
create_base() {
- call_with_stamp call_debootstrap $FAI_DEBOOTSTRAP
+ call_debootstrap $FAI_DEBOOTSTRAP
$ROOTCMD apt-get clean
rm -f $NFSROOT/etc/resolv.conf $NFSROOT/etc/hostname $NFSROOT/etc/udev/rules.d/70-persistent-net.rules
if [ $usexz -eq 0 ]; then
@@ -327,9 +314,9 @@
cd $NFSROOT || die 1 "Can't cd to $NFSROOT"
if [ -n "$basetgz" ] ; then
- call_with_stamp extract_base
+ extract_base
else
- call_with_stamp create_base
+ create_base
fi
touch .THIS_IS_THE_FAI_NFSROOT
# save the list of all packages in the base.tgz
@@ -356,14 +343,14 @@
Aptitude::CmdLine::Ignore-Trust-Violations yes;
EOF
echo "Upgrading $NFSROOT"
- LC_ALL=C call_verbose call_with_stamp upgrade_nfsroot
+ LC_ALL=C call_verbose upgrade_nfsroot
# overwrite default live.conf
[ -f $cfdir/live.conf ] || die 1 "$cfdir/live.conf not found."
cp -Lp $cfdir/live.conf etc/live.conf
- LC_ALL=C call_with_stamp add_packages_nfsroot
- call_with_stamp copy_fai_files
+ LC_ALL=C add_packages_nfsroot
+ copy_fai_files
# set timezone in nfsroot
timezone=$(readlink /etc/localtime | sed 's%^/usr/share/zoneinfo/%%')
@@ -393,7 +380,7 @@
. /tmp/fai/variables.log 2>/dev/null
EOF
- call_verbose call_with_stamp setup_ssh
+ call_verbose setup_ssh
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
upgrade_nfsroot() {
@@ -476,8 +463,8 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
kernel_install() {
- call_with_stamp install_kernel_nfsroot
- call_with_stamp setup_dhcp
+ install_kernel_nfsroot
+ setup_dhcp
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
run_hooks() {
@@ -561,7 +548,7 @@
usexz=1
fi
-call_with_stamp create_nfsroot
+create_nfsroot
kernel_install
run_hooks
Modified: trunk/man/make-fai-nfsroot.8
===================================================================
--- trunk/man/make-fai-nfsroot.8 2011-08-01 09:31:19 UTC (rev 6635)
+++ trunk/man/make-fai-nfsroot.8 2011-08-01 09:33:50 UTC (rev 6636)
@@ -71,75 +71,12 @@
.TP
.BI \-h
Show simple help.
-.TP
-.B \-r
-Attempt to recover a previously failed run of this command.
.SH NOTES
.PD 0
If you do not use NFS, you may still use the NFSROOT
directory as a staging point for building the base installation tarball.
-.SH RECOVERY
-.PD 0
-.B CAUTION!
-This is an advanced feature. You should be willing to open up an
-editor and browse the make-fai-nfsroot code to understand what each task
-does and how your use of the recovery option can be impacted by fiddling
-around with the stamp files.
-
-You can call make-fai-nfsroot with the '\-r' option to attempt a recovery of
-a previous run. As tasks are completed, stamp files are generated in
-/var/run/fai/make-fai-nfsroot. As each task is called in recovery mode, the
-stamp file is checked. If it exists, the task is skipped. This will save
-you much time during your initial install and debug phase. It is not a very
-sophisticated mechanism but it can help you on updating the nfsroot as
-well. For example, if you want to update the kernel that is installed,
-remove the following stamp files: install_kernel_nfsroot_stamp,
-setup_bootp_stamp, setup_dhcp_stamp.
-
-The order in which the stamp files are created are as follows:
-
-.TP
-.B call_debootstrap_stamp
-Debootstrap was called successfully.
-
-.TP
-.B create_base_stamp
-Created after successfully calling debootstrap plus a couple of other tasks.
-
-.TP
-.B upgrade_nfsroot_stamp
-The packages in $NFSROOT have successfully been upgraded with apt.
-
-.TP
-.B add_packages_nfsroot_stamp
-New packages have been installed with apt as specified by the $NFSPACKAGES
-environment variable in /etc/fai/fai.conf.
-
-.TP
-.B copy_fai_files_stamp
-FAI copies a base of files to the NFSROOT directory.
-
-.TP
-.B setup_ssh_stamp
-The SSH environment is set up. You could probably remove this stamp alone
-to refresh your ssh setup.
-
-.TP
-.B create_nfsroot_stamp
-This stamp file is created when all the preceeding steps have been taken.
-You have a base nfsroot directory. All you need now is the kernel and the
-BOOTP or DHCP setup.
-
-.TP
-.B install_kernel_nfsroot_stamp
-The kernel you specified in $KERNELPACKAGE has been installed.
-
-.TP
-.B setup_bootp_stamp | setup_dhcp_stamp
-Your kernel was either BOOTP or DHCP. The appropriate setup has been completed.
-
.PD
.SH SEE ALSO
.PD 0
More information about the Fai-commit
mailing list