Posted: Wed 13 Nov 2013, 22:15
Don't know what I am doing :
/root/KarlGodtWOOF.GIT/woof-CE/woof-code/rootfs-skeleton/etc/rc.d/rc.shutdown
And much more to figure out ..
/root/KarlGodtWOOF.GIT/woof-CE/woof-code/rootfs-skeleton/etc/rc.d/rc.shutdown
Code: Select all
#130217 01micko: relocate umount of network shares.
PATH=/bin:/sbin:/usr/bin:/usr/sbin
#read PUPPYVERSION </etc/puppyversion
#110923
. /usr/bin/gettext.sh # enables use of eval_gettext (several named variables) and ngettext (plurals)
export TEXTDOMAIN=rc.shutdown
export OUTPUT_CHARSET=UTF-8
. /etc/rc.d/functions4puppy #v3.01
#variables created at bootup by init script in initrd...
. /etc/rc.d/PUPSTATE #v2.02
. /etc/DISTRO_SPECS #v412
ORIGPUPMODE=$PUPMODE #v2.22
if [ "$PUPMODE" = 5 ] ; then
clear
exec 1> /dev/null 2>&1
fi
which rfkill &>/dev/null && rfkill unblock all #110919 jemimah has this in fluppy. if don't do this, may be locked at next boot.
#w482 use xorriso if it is installed (see also functions4puppy)...
CDRECORD='cdrecord'
MKISOFS='mkisofs'
if [ "`which xorriso`" != "" ];then
CDRECORD='xorrecord'
MKISOFS='xorrisofs' #growisofs reads this variable.
fi
export CDRECORD MKISOFS
#echo "`eval_gettext \"\\\${DISTRO_NAME} is now shutting down...\"`" > /dev/console
#echo "${DISTRO_NAME} is now shutting down..." > /dev/console
pidof poweroff 2>/dev/null && {
echo "${DISTRO_NAME} ${DISTRO_VERSION} $(gettext 'is now shutting down...')" > /dev/console #120130
} || {
pidof reboot 2>/dev/null && {
echo "${DISTRO_NAME} ${DISTRO_VERSION} $(gettext 'is now rebooting...')" > /dev/console
} || {
#echo $(gettext "Executing /etc/rc.d/rc.shutdown...")
echo "Executing /etc/rc.d/rc.shutdown..."
}; }
#100315 improper shutdown check. see /etc/rc.d/rc.sysinit, /init in initramfs, and /sbin/init...
if [ -f /fsckme.flg ];then
if [ -f /tmp/dmesg_e2fsck_warnings1 ];then #120717 rc.sysinit creates this file for full installation.
if [ "`grep -G "(${PDEV1})" /tmp/dmesg_e2fsck_warnings1`" = "" ];then
rm -f /fsckme.flg
else
echo -n 'MAXIMAL' >> /fsckme.flg #read by /sbin/initNEW
fi
else
rm -f /fsckme.flg
fi
fi
[ -f /initrd${PUP_HOME}/fsckme.flg ] && rm -f /initrd${PUP_HOME}/fsckme.flg
#puppy.sfs is in a subdirectory, default to saving in it...
PUPSFSFILE=`echo "$PUPSFS" | cut -f 3 -d ','`
PSUBDIR=`dirname "$PUPSFSFILE"`
[ "$PSUBDIR" = "/" ] && PSUBDIR=""
[ $PUPMODE -eq 5 -a "$DEV1FS" = "iso9660" ] && PSUBDIR="" #100920 booting off cd, always default have savefile at /.
[ $PUPMODE -eq 5 -a "$DEV1FS" = "udf" ] && PSUBDIR="" #130128 ditto, for udf f.s.
[ "$DEV1FS" = "msdos" ] && DEV1FS="vfat" #110919
#100920 reverse...
##100915 if booting from cd, .sfs's now optionally copied into a subdir, also want save-file in it...
## (warning: puppy.sfs on cd must be at /)
#if [ "$PSUBDIR" = "" ];then
# if [ "$DEV1FS" = "iso9660" ];then #test if booted off cd.
# PSUBDIR="`echo -n "${DISTRO_IDSTRING}" | cut -c 1-8`" #limit dir name to 8 chars.
# fi
#fi
#for a full hd install, only setting PUPMODE (=2). no /initrd, no initrd.gz.
killzombies() {