2009/7/29 Daniel Baumann <[email protected]>
> Rui Miguel Bernardo wrote:
> > Here is a correct patch (I hope).
>
> for the records (it doesn't matter here, but it's a major nuissance in
> general when sending patches): your diff is somewhat cluttered, you
> should only change what you changed on purpose and thus send a minimal
> diff only (e.g. here, the case statement is changed without changing it
> (probably changed the indenting)).
>
Sorry if my first patch wasn't in the correct format, but i *think* the
second is. "diff --git" doest work here, guess I'm missing some package in
my system.
I've used "diff -Naur" in two parallel directories and the resulting patch
was correctly applied in config/chrool_local-patches (the first one was not
using correct directories, comparing my system live-helpers with the one
i've modified and put in config/chroot_local-includes).
About the identation, and to be clear, here is the live-helpers modified
section:
if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" =
"${pers_label}" ]
then
echo "${devname}"
return 0
fi
if [ "${PERSISTENT}" != "nofiles" ]
then
case "$(get_fstype ${devname})" in
vfat|ext2|ext3|ext4|jffs2)
mkdir -p "${cow_backing}"
if ! try_mount "${devname}" "${cow_backing}" "rw"
then
break
fi
if [ -f "${pers_fpath}" ]
then
echo $(setup_loop "${pers_fpath}" "loop"
"/sys/block/loop*")
return 0
else
umount ${cow_backing}
fi
;;
*)
;;
esac
fi
I've swaped the if to != nofiles (instead of = nofiles) and moved (included)
the case statements to inside the "swaped" if block (that's why the
indentation), so the are only executed if PERSISTENT != nofiles.
The break statement was preventing the loop to continue just because
PERSISTENT=nofiles.
I *hope* (again?) to have cleared any confusion. Please feel free to comment
or suggest anything.
Thank you for all your work. live-helper is really great. Makes Debian more
Debian.
Rui M. P. Bernardo