Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 35 lines (27 sloc) 937 Bytes
#!/bin/sh
# initramfs-tools header
case "${1}" in
prereqs)
# No prereqs
exit 0
;;
esac
. /scripts/live-functions
log_begin_msg "Finishing up git-fs"
if [ -d "${rootmnt}/.git-fixups" ]; then
chroot "${rootmnt}" sh -c 'for s in /.git-fixups/*; do sh $s; done'
fi
# Store the git-fs pid, to prevent git-fs from being killed on
# shutdown. With live-boot 2.0, this is done by writing to
# /live/root.pid. With live-boot 3.0, this feature is dropped in
# favor of writing directly to /run (which doesn't seem to be available
# in lenny yet). To be sure, we just write to both.
# This applies to shutdown using systemv init only
# (/etc/init.d/sendsigs). When using systemd, git-fs takes care of this
# itself when -o initrd-root is passed (see git-fs source).
if pidof git-fs >/dev/null; then
mkdir -p /run/sendsigs.omit.d;
pidof git-fs >> /run/sendsigs.omit.d/git-fs
pidof git-fs >> ${rootmnt}/live/root.pid
fi
log_end_msg