ok, i think i had the existence test pointing at the wrong place, this should be correct:
Code: Select all
FOLDERS="$(for x in $(grep ^/ $CHNEXIT_CONF | sed s/.//); do test -e /mnt/live/memory/changes/$x && echo $x; done)"
or maybe even, since the script has cd'd to /mnt/live/memory/changes at the point when $FOLDERS is called:
Code: Select all
FOLDERS="$(for x in $(grep ^/ $CHNEXIT_CONF | sed s/.//); do test -e $x && echo $x; done)"
but i don't suppose the absolute path hurts.
rych wrote: ↑06 Jul 2024, 08:15
do you know why the initrd>cleanup doesn't invoke this script by name
all before my time.
dump-session seems to do more and differently, with egrep, IFS word-splitting contingency and elaborate sed instead of some tr ...
changes-exit users havn't complained of any problem that i'm aware of, but that may not mean anything..
just a crazy thought bubble: a possibility would be to call it earlier from rc.6
unless there's some particular reason to have it in cleanup, but i don't really see it, since you can clearly 'dump-session' any time you want.
EDIT: did a bit of a forum search and found:
viewtopic.php?f=53&t=7396 and
viewtopic.php?f=53&t=7316&start=45
and it seems that abelM was thinking along these lines.. if you do this, ie add this to rc.local_shutdown
Code: Select all
# /etc/rc.d/rc.local_shutdown
[ -e /mnt/live/tmp/changes-exit ] && /opt/porteus-scripts/dump-session && rm -f /mnt/live/tmp/changes-exit
that will cancel the cleanup changes-exit routine and use the script instead.
there have to be more to it that in the end eg. an option to skip