Package: fai-client
severity: wishlist
Version: 3.2.2

This patch fixes so that proc gets mounted in any case and that when
stuff's gets mounted it doesn't try to touch mtab because its a symbolic
link.

I was to laisy to create to separate patches because they are so small.

//Anton

-- 
Anton Lundin    +46702-161604
--- ../fai-trunk/bin/fai        2007-11-22 22:51:39.000000000 +0100
+++ fai 2007-11-26 20:06:28.000000000 +0100
@@ -30,9 +30,9 @@
 
 export 
PATH=/usr/local/sbin:/usr/local/bin:/usr/lib/fai:/bin:/sbin:/usr/bin:/usr/sbin:
 # some variables
 export FAI_VERSION="FAI 3.2.2, 22 Nov 2007"
 stamp=/var/run/fai/FAI_INSTALLATION_IN_PROGRESS
-export romountopt="-o async,noatime,nolock,ro,actimeo=1800"
+export romountopt="-n -o async,noatime,nolock,ro,actimeo=1800"
 
 export STOP_ON_ERROR=99999
 export faimond=0
@@ -43,6 +43,13 @@
     set -a # now export all variables
     set -o pipefail
 
+    # should happen by live-initramfs, but if it didn't mount it ourselves
+    if [ ! -f /proc/version ]; then
+        mount -t proc proc /proc
+    fi
+
+    export start_seconds=$(cut -d . -f 1 /proc/uptime)
+
     umask 022
     if [ ! -d "$FAI_ETC_DIR" ]; then
        echo "$FAI_ETC_DIR is not a directory"
@@ -228,7 +235,7 @@
     export FAI_DEBOOTSTRAP=$(source $FAI_ETC_DIR/make-fai-nfsroot.conf; echo 
$FAI_DEBOOTSTRAP)
     export FAI_DEBOOTSTRAP_OPTS=$(source $FAI_ETC_DIR/make-fai-nfsroot.conf; 
echo $FAI_DEBOOTSTRAP_OPTS)
 
-fi
+    fi
 
 if [ $(id -u) != "0" ]; then
     echo "Run this program as root."
@@ -249,7 +256,6 @@
     renewclass=1 # always renew class list when installing
     mkdir -p /var/lib/discover /var/discover /etc/sysconfig
 fi
-export start_seconds=$(cut -d . -f 1 /proc/uptime)
 
 if [ X$action = Xdirinstall -a -n "$newhostname" ]; then
     export HOSTNAME=$newhostname

Attachment: pgpXK8WazND9J.pgp
Description: PGP signature

Reply via email to