update scripts to use new live path /run/initramfs
parent
087eb008e0
commit
7696013557
|
|
@ -4,7 +4,7 @@ Documentation=man:dhclient(8)
|
|||
Wants=network.target
|
||||
After=network-pre.target systemd-sysctl.service systemd-modules-load.service
|
||||
Before=network.target shutdown.target network-online.target
|
||||
ConditionPathExists=!/mnt/live/net.up.flag
|
||||
ConditionPathExists=!/run/initramfs/net.up.flag
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@
|
|||
# Simply add the following as the last command executed by init on your distro
|
||||
# instead of the actual poweroff or shutdown command:
|
||||
#
|
||||
# exec /mnt/live/lib/cleanup --start poweroff
|
||||
# exec /run/initramfs/lib/cleanup --start poweroff
|
||||
# or
|
||||
# exec /mnt/live/lib/cleanup --start shutdown
|
||||
# exec /run/initramfs/lib/cleanup --start shutdown
|
||||
#
|
||||
# on Slackware, add this to rc.0:
|
||||
# exec /mnt/live/lib/cleanup --start /sbin/$command
|
||||
# exec /run/initramfs/lib/cleanup --start /sbin/$command
|
||||
#
|
||||
# It may be needed to call this script also with --killall5 from your shutdown scripts
|
||||
# instead of calling regular killall5, to prevent fuse filesystems from being killed
|
||||
|
|
@ -23,7 +23,7 @@ if [ "$1" = "--killall5" ]; then
|
|||
# kill all unneeded processes, which have smaller ID then the ID of
|
||||
# current shell's parent process. We can't use killall5, as it would kill some
|
||||
# processes which may be currently needed, for example fuse filesystems (ntfs-3g).
|
||||
for pid in $(/mnt/live/bin/ps | grep -v "PID" | grep -E -v "\[.*\]" | grep -E -v "mount|posixovl|fuse" | sed -r "s/^ +//" | cut -d " " -f 1); do
|
||||
for pid in $(/run/initramfs/bin/ps | grep -v "PID" | grep -E -v "\[.*\]" | grep -E -v "mount|posixovl|fuse" | sed -r "s/^ +//" | cut -d " " -f 1); do
|
||||
if [ $pid -lt $PPID ]; then
|
||||
LIST="$LIST $pid"
|
||||
fi
|
||||
|
|
@ -41,7 +41,7 @@ if [ "$1" = "--start" ]; then
|
|||
# So we're going to force init to stop and start this script instead as PID 1
|
||||
# If your init works differently, you may need to slightly modify few lines below
|
||||
# - without this, init would be blocking union and it couldn't be unmounted later.
|
||||
cd /mnt/live
|
||||
cd /run/initramfs
|
||||
cp "$0" sbin/init
|
||||
pivot_root . memory/union
|
||||
echo "$2 -f" > /lib/command
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
TMP=/tmp/changes$$
|
||||
EXCLUDE="^\$|/\$|[.]wh[.][.]wh[.]orph/|^[.]wh[.][.]wh[.]plnk/|^[.]wh[.][.]wh[.]aufs|^var/cache/|^var/backups/|^var/tmp/|^var/log/|^var/lib/apt/|^var/lib/dhcp/|^var/lib/systemd/|^sbin/fsck[.]aufs|^etc/resolv[.]conf|^root/[.]Xauthority|^root/[.]xsession-errors|^root/[.]fehbg|^root/[.]fluxbox/lastwallpaper|^etc/mtab|^etc/fstab|^boot/|^dev/|^mnt/|^proc/|^run/|^sys/|^tmp/"
|
||||
CHANGES=/mnt/live/memory/changes
|
||||
CHANGES=/run/initramfs/memory/changes
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
echo ""
|
||||
|
|
@ -13,7 +13,7 @@ if [ "$1" = "" ]; then
|
|||
echo "Usage:"
|
||||
echo " $0 [ target_file.sb ] [ changes_directory ]"
|
||||
echo ""
|
||||
echo "If changes_directory is not specified, /mnt/live/memory/changes is used."
|
||||
echo "If changes_directory is not specified, /run/initramfs/memory/changes is used."
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
# list
|
||||
|
||||
|
||||
LIVE=/mnt/live/memory
|
||||
LIVE=/run/initramfs/memory
|
||||
|
||||
# Print error message and exit
|
||||
# $1 = error message
|
||||
|
|
|
|||
Loading…
Reference in New Issue