From: Daniel Baumann Date: Sun, 23 Sep 2007 12:46:24 +0000 (+0200) Subject: Adding casper 1.63+debian-3. X-Git-Tag: debian/1.63+debian-3^0 X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=commitdiff_plain;h=a4f706a4bfe34ed6064c79d5ad7b3295fb0431cd Adding casper 1.63+debian-3. --- diff --git a/debian/changelog b/debian/changelog index 05b55b4..eb8357d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Wed, 16 Aug 2006 20:10:11 +0200 + casper (1.63+debian-2) unstable; urgency=low * Working netboot support (Closes: #380506). diff --git a/debian/control b/debian/control index 171d184..dd0d461 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: misc Priority: optional Maintainer: Marco Amadori Uploaders: Daniel Baumann -Build-Depends: debhelper (>= 4), dpatch +Build-Depends: debhelper (>= 4) Standards-Version: 3.7.2 Package: casper diff --git a/debian/init.d b/debian/init.d index bed1b89..424c024 100644 --- a/debian/init.d +++ b/debian/init.d @@ -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 diff --git a/debian/rules b/debian/rules index c7fdbac..bd01663 100755 --- a/debian/rules +++ b/debian/rules @@ -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 diff --git a/scripts/casper b/scripts/casper index 8338a06..5cfb66e 100644 --- a/scripts/casper +++ b/scripts/casper @@ -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