Adding casper 1.63+debian-3. debian/1.63+debian-3
authorDaniel Baumann <daniel@debian.org>
Sun, 23 Sep 2007 12:46:24 +0000 (14:46 +0200)
committerDaniel Baumann <daniel@debian.org>
Sun, 23 Sep 2007 12:46:24 +0000 (14:46 +0200)
debian/changelog
debian/control
debian/init.d
debian/rules
scripts/casper

index 05b55b4..eb8357d 100644 (file)
@@ -1,3 +1,10 @@
+casper (1.63+debian-3) unstable; urgency=low
+
+  * Really do not try to eject cd if netbooted.
+  * Fixed unionfs ro param in case of nfs netboot (Closes: 383346).
+
+ -- Marco Amadori <marco.amadori@gmail.com>  Wed, 16 Aug 2006 20:10:11 +0200
+
 casper (1.63+debian-2) unstable; urgency=low
 
   * Working netboot support (Closes: #380506).
index 171d184..dd0d461 100644 (file)
@@ -3,7 +3,7 @@ Section: misc
 Priority: optional
 Maintainer: Marco Amadori <marco.amadori@gmail.com>
 Uploaders: Daniel Baumann <daniel@debian.org>
-Build-Depends: debhelper (>= 4), dpatch
+Build-Depends: debhelper (>= 4)
 Standards-Version: 3.7.2
 
 Package: casper
index bed1b89..424c024 100644 (file)
@@ -1,5 +1,10 @@
 #! /bin/sh
 
+# check for netboot
+if grep -qs netboot /proc/cmdline || grep -qsi root=/dev/nfs /proc/cmdline  || grep -qsi root=/dev/cifs /proc/cmdline ; then
+       exit 0
+fi
+
 grep -qs boot=casper /proc/cmdline || exit 0
 
 # Try to cache everything we're likely to need after ejecting.  This
index c7fdbac..bd01663 100755 (executable)
@@ -3,9 +3,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-include /usr/share/dpatch/dpatch.make
-
-build: patch-stamp build-stamp
+build: build-stamp
 build-stamp:
        dh_testdir
        
@@ -14,9 +12,9 @@ build-stamp:
 
        touch build-stamp
 
-clean: unpatch
+clean:
        dh_testdir
-       rm -f patch-stamp build-stamp
+       rm -f build-stamp
 
        # Cleaning package
        -$(MAKE) -C casper-md5check clean
index 8338a06..5cfb66e 100644 (file)
@@ -290,6 +290,8 @@ do_netmount() {
        if [ "${NETBOOT}" != "nfs" ] && do_cifsmount ; then
                rc=0
        elif do_nfsmount ; then
+               NETBOOT=nfs
+               export NETBOOT
                rc=0
        fi
 
@@ -344,14 +346,20 @@ setup_unionfs() {
        # Let's just mount the read-only file systems first
        rofsstring=""
        rofslist=""
+       if [ ${NETBOOT} == "nfs" ] ; then
+               roopt="nfsro" # go aroung a bug in nfs-unionfs locking
+       else
+               roopt="ro"
+       fi
+
        mkdir -p "${croot}"
        for image_type in "ext2" "squashfs" "dir" ; do
                for image in "${image_directory}"/*."${image_type}"; do
                        imagename=$(basename "${image}")
                        if [ -d "${image}" ]; then
                                # it is a plain directory: do nothing
+                               rofsstring="${image}=${roopt}:${rofsstring}"
                                rofslist="${image} ${rofslist}"
-                               rofsstring="${image}=ro:${rofsstring}"
                        elif [ -f "${image}" ]; then
                                backdev=$(get_backing_device "$image")
                                fstype=$(get_fstype "${backdev}")
@@ -359,7 +367,7 @@ setup_unionfs() {
                                        panic "Unknown file system type on ${backdev} (${image})"
                                fi
                                mkdir -p "${croot}/${imagename}"
-                               mount -t "${fstype}" -o ro "${backdev}" "${croot}/${imagename}" || panic "Can not mount $backdev ($image) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=ro:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}"
+                               mount -t "${fstype}" -o ro "${backdev}" "${croot}/${imagename}" || panic "Can not mount $backdev ($image) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}"
                        fi
                done
        done