diff options
author | James Meyer <jams@linhes.org> | 2010-12-05 16:20:29 (GMT) |
---|---|---|
committer | James Meyer <jams@linhes.org> | 2010-12-05 16:20:29 (GMT) |
commit | d90635a05239a0a773158378cc964b0b34a41452 (patch) | |
tree | cd70ddb5dc917d99204a3398c3176ae7249e91e9 /build_tools | |
parent | 2a67bf8b848ba40cc3b27b27e02e08d6753a2067 (diff) | |
download | linhes_dev-d90635a05239a0a773158378cc964b0b34a41452.zip |
profile sync: minor change to the countdown after cd is ejected.
Also synced up added packs between testing and stable.
Diffstat (limited to 'build_tools')
7 files changed, 222 insertions, 17 deletions
diff --git a/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks b/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks index b43b5c5..1fa97d7 100644 --- a/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks +++ b/build_tools/larch8/larch0/profiles/linhes-local-disk-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks @@ -81,10 +81,15 @@ doeject () # echo "It's safe to switch the computer off now" # echo -ne "Press Enter to continue" # read junk - for i in 10 9 8 7 6 5 4 3 2 1 + for i in 10 9 8 7 6 5 4 3 2 1 do - sleep 1 - printf "\r%02d" $i - done - eject -t $1 + read -t 1 -p "press any key to continue ($i): " + if [ $? = 0 ] + then + break + fi + printf "\r" + done + + eject -t $1 } diff --git a/build_tools/larch8/larch0/profiles/linhes-local-mirror-stable-i686/addedpacks b/build_tools/larch8/larch0/profiles/linhes-local-mirror-stable-i686/addedpacks index 3972964..49986ae 100755 --- a/build_tools/larch8/larch0/profiles/linhes-local-mirror-stable-i686/addedpacks +++ b/build_tools/larch8/larch0/profiles/linhes-local-mirror-stable-i686/addedpacks @@ -53,7 +53,7 @@ unzip ttf-ms-fonts #xorg-video-drivers -xf86-video-amd +#xf86-video-amd xf86-video-apm xf86-video-ark xf86-video-ati diff --git a/build_tools/larch8/larch0/profiles/linhes-local-mirror-stable-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks b/build_tools/larch8/larch0/profiles/linhes-local-mirror-stable-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks new file mode 100644 index 0000000..1fa97d7 --- /dev/null +++ b/build_tools/larch8/larch0/profiles/linhes-local-mirror-stable-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks @@ -0,0 +1,95 @@ +# larch handlers for rc. script hooks +# 2010.10.14 + + +sysinit_premount_larch() { +# status "larch sysinit_premount hook" +# # Rebuild /etc/mtab +# grep "^aufs */ " /proc/mounts >/etc/mtab.new +# grep "^tmpfs */.livesys " /proc/mounts >>/etc/mtab.new +# if [ -d /.livesys/medium/larch ]; then +# grep " /.livesys/medium " /proc/mounts >>/etc/mtab.new +# fi +# grep -v "^rootfs " /etc/mtab >>/etc/mtab.new +# mv /etc/mtab.new /etc/mtab + + # Add disk partitions to /etc/fstab + x10d_fstab +} +add_hook sysinit_premount sysinit_premount_larch + + +sysinit_end_larch() { + # Allow setting up of xorg.conf before xorg is started + #status "larch sysinit_end hook" + [ -x /etc/X11/xinit/xorg.conf.set ] && /etc/X11/xinit/xorg.conf.set +} +add_hook sysinit_end sysinit_end_larch + + +shutdown_postkillall_larch() { + #status "larch shutdown_postkillall hook" + if ! [ -f /.livesys/saveclock ]; then + # This will prevent the hardware clock from being set + HARDWARECLOCK='LIVE' + fi +} +add_hook shutdown_postkillall shutdown_postkillall_larch + + +shutdown_poweroff_larch() { + #status "larch shutdown_poweroff hook" + + # This shouldn't be needed, but better safe than sorry? + sync + + # Eject CD/DVD + ############################# Deal with ejecting + # See if boot device still mounted and ejectable (CD/DVD) + bootdev=$( cat /.livesys/bootdevice ) + if [ -f /proc/sys/dev/cdrom/info ]; then + cdroms=$( cat /proc/sys/dev/cdrom/info | { while read a b c; do + if [ "${a}" = "drive" -a "${b}" = "name:" ]; then + echo "${c}" + break + fi + done + } ) + for d in ${cdroms}; do + if [ "/dev/${d}" = "${bootdev}" ]; then + # booted from CD/DVD + if grep "^${bootdev} " /proc/mounts &>/dev/null; then + # it needs to be ejected + doeject ${bootdev} + fi + break + fi + done + fi +} +add_hook shutdown_poweroff shutdown_poweroff_larch + +doeject () +{ + echo "Ejecting live CD" + mount -n -o remount,rw / + # Remove the boot medium from /etc/mtab so that eject works + sed "/ \/.livesys\/medium / d" -i /etc/mtab + eject $1 + mount -n -o remount,ro / +# echo "========================================" +# echo "It's safe to switch the computer off now" +# echo -ne "Press Enter to continue" +# read junk + for i in 10 9 8 7 6 5 4 3 2 1 + do + read -t 1 -p "press any key to continue ($i): " + if [ $? = 0 ] + then + break + fi + printf "\r" + done + + eject -t $1 +} diff --git a/build_tools/larch8/larch0/profiles/linhes-local-mirror-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks b/build_tools/larch8/larch0/profiles/linhes-local-mirror-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks index b43b5c5..1fa97d7 100644 --- a/build_tools/larch8/larch0/profiles/linhes-local-mirror-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks +++ b/build_tools/larch8/larch0/profiles/linhes-local-mirror-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks @@ -81,10 +81,15 @@ doeject () # echo "It's safe to switch the computer off now" # echo -ne "Press Enter to continue" # read junk - for i in 10 9 8 7 6 5 4 3 2 1 + for i in 10 9 8 7 6 5 4 3 2 1 do - sleep 1 - printf "\r%02d" $i - done - eject -t $1 + read -t 1 -p "press any key to continue ($i): " + if [ $? = 0 ] + then + break + fi + printf "\r" + done + + eject -t $1 } diff --git a/build_tools/larch8/larch0/profiles/linhes-remote-stable-i686/addedpacks b/build_tools/larch8/larch0/profiles/linhes-remote-stable-i686/addedpacks index 3972964..49986ae 100755 --- a/build_tools/larch8/larch0/profiles/linhes-remote-stable-i686/addedpacks +++ b/build_tools/larch8/larch0/profiles/linhes-remote-stable-i686/addedpacks @@ -53,7 +53,7 @@ unzip ttf-ms-fonts #xorg-video-drivers -xf86-video-amd +#xf86-video-amd xf86-video-apm xf86-video-ark xf86-video-ati diff --git a/build_tools/larch8/larch0/profiles/linhes-remote-stable-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks b/build_tools/larch8/larch0/profiles/linhes-remote-stable-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks new file mode 100644 index 0000000..1fa97d7 --- /dev/null +++ b/build_tools/larch8/larch0/profiles/linhes-remote-stable-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks @@ -0,0 +1,95 @@ +# larch handlers for rc. script hooks +# 2010.10.14 + + +sysinit_premount_larch() { +# status "larch sysinit_premount hook" +# # Rebuild /etc/mtab +# grep "^aufs */ " /proc/mounts >/etc/mtab.new +# grep "^tmpfs */.livesys " /proc/mounts >>/etc/mtab.new +# if [ -d /.livesys/medium/larch ]; then +# grep " /.livesys/medium " /proc/mounts >>/etc/mtab.new +# fi +# grep -v "^rootfs " /etc/mtab >>/etc/mtab.new +# mv /etc/mtab.new /etc/mtab + + # Add disk partitions to /etc/fstab + x10d_fstab +} +add_hook sysinit_premount sysinit_premount_larch + + +sysinit_end_larch() { + # Allow setting up of xorg.conf before xorg is started + #status "larch sysinit_end hook" + [ -x /etc/X11/xinit/xorg.conf.set ] && /etc/X11/xinit/xorg.conf.set +} +add_hook sysinit_end sysinit_end_larch + + +shutdown_postkillall_larch() { + #status "larch shutdown_postkillall hook" + if ! [ -f /.livesys/saveclock ]; then + # This will prevent the hardware clock from being set + HARDWARECLOCK='LIVE' + fi +} +add_hook shutdown_postkillall shutdown_postkillall_larch + + +shutdown_poweroff_larch() { + #status "larch shutdown_poweroff hook" + + # This shouldn't be needed, but better safe than sorry? + sync + + # Eject CD/DVD + ############################# Deal with ejecting + # See if boot device still mounted and ejectable (CD/DVD) + bootdev=$( cat /.livesys/bootdevice ) + if [ -f /proc/sys/dev/cdrom/info ]; then + cdroms=$( cat /proc/sys/dev/cdrom/info | { while read a b c; do + if [ "${a}" = "drive" -a "${b}" = "name:" ]; then + echo "${c}" + break + fi + done + } ) + for d in ${cdroms}; do + if [ "/dev/${d}" = "${bootdev}" ]; then + # booted from CD/DVD + if grep "^${bootdev} " /proc/mounts &>/dev/null; then + # it needs to be ejected + doeject ${bootdev} + fi + break + fi + done + fi +} +add_hook shutdown_poweroff shutdown_poweroff_larch + +doeject () +{ + echo "Ejecting live CD" + mount -n -o remount,rw / + # Remove the boot medium from /etc/mtab so that eject works + sed "/ \/.livesys\/medium / d" -i /etc/mtab + eject $1 + mount -n -o remount,ro / +# echo "========================================" +# echo "It's safe to switch the computer off now" +# echo -ne "Press Enter to continue" +# read junk + for i in 10 9 8 7 6 5 4 3 2 1 + do + read -t 1 -p "press any key to continue ($i): " + if [ $? = 0 ] + then + break + fi + printf "\r" + done + + eject -t $1 +} diff --git a/build_tools/larch8/larch0/profiles/linhes-remote-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks b/build_tools/larch8/larch0/profiles/linhes-remote-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks index b43b5c5..1fa97d7 100644 --- a/build_tools/larch8/larch0/profiles/linhes-remote-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks +++ b/build_tools/larch8/larch0/profiles/linhes-remote-testing-i686/rootoverlay/etc/rc.d/functions.d/larch-hooks @@ -81,10 +81,15 @@ doeject () # echo "It's safe to switch the computer off now" # echo -ne "Press Enter to continue" # read junk - for i in 10 9 8 7 6 5 4 3 2 1 + for i in 10 9 8 7 6 5 4 3 2 1 do - sleep 1 - printf "\r%02d" $i - done - eject -t $1 + read -t 1 -p "press any key to continue ($i): " + if [ $? = 0 ] + then + break + fi + printf "\r" + done + + eject -t $1 } |