+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).
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
#! /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
# 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
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
if [ "${NETBOOT}" != "nfs" ] && do_cifsmount ; then
rc=0
elif do_nfsmount ; then
+ NETBOOT=nfs
+ export NETBOOT
rc=0
fi
# 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}")
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