diff -Nur casper-1.152.orig/debian/casper.init casper-1.152/debian/casper.init --- casper-1.152.orig/debian/casper.init 2008-10-25 23:46:45.000000000 +0100 +++ casper-1.152/debian/casper.init 2009-04-10 14:49:09.000000000 +0100 @@ -75,6 +75,17 @@ prompt= fi + # remount cow ro + OPTS=`grep '^aufs / aufs ' /proc/mounts | awk '{print $4}'` + if [ -n "$OPTS" ]; then + OPTS=`echo "$OPTS" | sed -e 's/xino=.*,/noxino,/' -e \ + 's/cow=rw/cow=ro/' -e 's/^rw/ro/'` + mount / -no remount,$OPTS + mount /cow -no remount,ro + sync # you'd think mount would do this .. + sleep 5 # could probably get away with less + fi + for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default $(which stty); do cache_path "$path" done @@ -113,3 +124,5 @@ exit 3 ;; esac + +# vi:ts=4:et: diff -Nur casper-1.152.orig/scripts/casper casper-1.152/scripts/casper --- casper-1.152.orig/scripts/casper 2008-10-25 23:46:45.000000000 +0100 +++ casper-1.152/scripts/casper 2009-04-03 00:57:25.000000000 +0100 @@ -396,6 +396,8 @@ mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || panic "Can not mount $cowdevice on /cow" mount -t ${UNIONFS} -o noatime,dirs=/cow=rw:$rofsstring ${UNIONFS} "$rootmnt" || panic "${UNIONFS} mount failed" + [ -d "${rootmnt}/cow" ] || mkdir "${rootmnt}/cow" + mount /cow "${rootmnt}/cow" -o move # Adding other custom mounts if [ -n "${PERSISTENT}" ]; then @@ -592,3 +594,5 @@ exec 2>&7 7>&- cp casper.log "${rootmnt}/var/log/" } + +# vi:ts=4:et: