Almost ready initscripts, just missing proper LED shutoff

This commit is contained in:
Mike Staszel 2011-01-01 23:56:57 -06:00
parent db88fa705c
commit 7910b35cfe
7 changed files with 73 additions and 71 deletions

View file

@ -272,28 +272,28 @@ run_hook() {
}
# Function for setting console font if required
set_consolefont() {
set_consolefont() {
if [ -n "$CONSOLEFONT" ]; then
stat_busy "Loading Console Font: $CONSOLEFONT"
#CONSOLEMAP in UTF-8 shouldn't be used
if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then
CONSOLEMAP=""
fi
for i in /dev/tty[0-9]*; do
if [ -n "$CONSOLEMAP" ]; then
/usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C ${i} >/dev/null 2>&1
else
/usr/bin/setfont $CONSOLEFONT -C ${i} >/dev/null 2>&1
fi
done
if [ $? -ne 0 ]; then
stat_fail
else
if [ -n "$CONSOLEMAP" ]; then
echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\033(K"; fi' >>/etc/profile.d/locale.sh
fi
stat_done
fi
stat_busy "Loading Console Font: $CONSOLEFONT"
#CONSOLEMAP in UTF-8 shouldn't be used
if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then
CONSOLEMAP=""
fi
for i in /dev/tty[0-9]*; do
if [ -n "$CONSOLEMAP" ]; then
/usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C ${i} >/dev/null 2>&1
else
/usr/bin/setfont $CONSOLEFONT -C ${i} >/dev/null 2>&1
fi
done
if [ $? -ne 0 ]; then
stat_fail
else
if [ -n "$CONSOLEMAP" ]; then
echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\033(K"; fi' >>/etc/profile.d/locale.sh
fi
stat_done
fi
fi
}
@ -305,3 +305,4 @@ for f in /etc/rc.d/functions.d/*; do
done
# End of file
# vim: set ft=sh sw=2 ts=2 et:

View file

@ -25,11 +25,11 @@ su:S:wait:/sbin/sulogin -p
# -8 options fixes umlauts problem on login
s0:12345:respawn:/sbin/agetty -8 115200 ttyS0 linux
# c1:2345:respawn:/sbin/agetty -8 38400 tty1 linux
# c2:2345:respawn:/sbin/agetty -8 38400 tty2 linux
# c3:2345:respawn:/sbin/agetty -8 38400 tty3 linux
# c4:2345:respawn:/sbin/agetty -8 38400 tty4 linux
# c5:2345:respawn:/sbin/agetty -8 38400 tty5 linux
c1:2345:respawn:/sbin/agetty -8 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 38400 tty5 linux
c6:2345:respawn:/sbin/agetty -8 38400 tty6 linux
# Hypervisor Virtual Console for Xen and KVM

View file

@ -199,4 +199,4 @@ int main(int argc, char **argv) {
exit(5);
}
}
/* vim: set ts=2 noet: */

View file

@ -234,9 +234,9 @@ case "$1" in
#fi
if [ "${NETWORK_PERSIST}" = "yes" -o "${NETWORK_PERSIST}" = "YES" ]; then
status "Skipping Network Shutdown" true
exit 0
fi
status "Skipping Network Shutdown" true
exit 0
fi
stat_busy "Stopping Network"
rm_daemon network

View file

@ -28,4 +28,4 @@ fi
run_hook multi_end
# End of file
# vim: set ts=2 noet:

View file

@ -9,7 +9,8 @@
echo " "
printhl "Plugbox Linux\n"
printhl "${C_H2}http://www.plugboxlinux.org"
printhl "Copyright 2009-2010 Mike Staszel"
printhl "Copyright 2009-2011 Mike Staszel"
printhl "Distributed under the GNU General Public License (GPL)"
printsep
run_hook sysinit_start
@ -55,20 +56,20 @@ fi
if [ -n "$HWCLOCK_PARAMS" ]; then
# enable rtc access
/sbin/modprobe -q rtc-cmos
# some custom kernels use rtc/genrtc, try to load those too
/sbin/modprobe -q rtc
/sbin/modprobe -q genrtc
# If devtmpfs is used, the required RTC device already exists now
# Otherwise, create whatever device is available
if [ ! -c /dev/rtc -a ! -c /dev/rtc0 ]; then
if [ -f /sys/class/rtc/rtc0/dev ]; then
IFS=: read -r major minor < /sys/class/rtc/rtc0/dev
/bin/mknod /dev/rtc0 c $major $minor
elif [ -f /sys/class/misc/rtc/dev ]; then
IFS=: read -r major minor < /sys/class/misc/rtc/dev
/bin/mknod /dev/rtc c $major $minor
fi
fi
# some custom kernels use rtc/genrtc, try to load those too
/sbin/modprobe -q rtc
/sbin/modprobe -q genrtc
# If devtmpfs is used, the required RTC device already exists now
# Otherwise, create whatever device is available
if [ ! -c /dev/rtc -a ! -c /dev/rtc0 ]; then
if [ -f /sys/class/rtc/rtc0/dev ]; then
IFS=: read -r major minor < /sys/class/rtc/rtc0/dev
/bin/mknod /dev/rtc0 c $major $minor
elif [ -f /sys/class/misc/rtc/dev ]; then
IFS=: read -r major minor < /sys/class/misc/rtc/dev
/bin/mknod /dev/rtc c $major $minor
fi
fi
# Do a clock set here for a few reasons:
# 1. Make creation time on udev nodes sane (FS#8665)
@ -158,18 +159,18 @@ if [ -f /etc/crypttab -a -n "$(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$)"
stat_busy "Unlocking encrypted volumes:"
csfailed=0
# Arch cryptsetup packages traditionally contained the binaries
# /usr/sbin/cryptsetup
# /sbin/cryptsetup.static
# By default, initscripts used the /sbin/cryptsetup.static.
# Newer packages will only have /sbin/cryptsetup and no static binary
# This ensures maximal compatibility with the old and new layout
if [ -x /sbin/cryptsetup ]; then
CS=/sbin/cryptsetup
elif [ -x /usr/sbin/cryptsetup ]; then
CS=/usr/sbin/cryptsetup
else
CS=/sbin/cryptsetup.static
fi
# /usr/sbin/cryptsetup
# /sbin/cryptsetup.static
# By default, initscripts used the /sbin/cryptsetup.static.
# Newer packages will only have /sbin/cryptsetup and no static binary
# This ensures maximal compatibility with the old and new layout
if [ -x /sbin/cryptsetup ]; then
CS=/sbin/cryptsetup
elif [ -x /usr/sbin/cryptsetup ]; then
CS=/usr/sbin/cryptsetup
else
CS=/sbin/cryptsetup.static
fi
do_crypt() {
if [ $# -ge 3 ]; then
cname="$1"
@ -255,10 +256,10 @@ fsck_reboot() {
if [ -x /sbin/fsck ]; then
stat_busy "Checking Filesystems"
FSCK_OUT=/dev/stdout
FSCK_ERR=/dev/stdout
FSCK_FD=
run_hook sysinit_prefsck
/sbin/fsck -A -T -C$FSCK_FD -a -t "$NETFS,noopts=_netdev" $FORCEFSCK >$FSCK_OUT 2>$FSCK_ERR
FSCK_ERR=/dev/stdout
FSCK_FD=
run_hook sysinit_prefsck
/sbin/fsck -A -T -C$FSCK_FD -a -t "$NETFS,noopts=_netdev" $FORCEFSCK >$FSCK_OUT 2>$FSCK_ERR
fsckret=$?
if [ ${fsckret} -gt 1 ]; then
stat_fail
@ -296,9 +297,9 @@ fi
stat_busy "Mounting Local Filesystems"
/bin/mount -n -o remount,rw /
if [ -x /bin/findmnt -a -e /proc/self/mountinfo ]; then
/bin/findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab
/bin/findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab
else
cat /proc/mounts >| /etc/mtab
cat /proc/mounts >| /etc/mtab
fi
run_hook sysinit_premount
# now mount all the local filesystems
@ -404,14 +405,14 @@ set_consolefont
# Adding persistent network/cdrom generated rules
if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
stat_busy "Adding persistent cdrom udev rules"
/bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
stat_busy "Adding persistent cdrom udev rules"
/bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
stat_done
fi
if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
stat_busy "Adding persistent network udev rules"
/bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
stat_done
stat_busy "Adding persistent network udev rules"
/bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
stat_done
fi
/bin/dmesg >| /var/log/dmesg.log
@ -424,4 +425,4 @@ fi
run_hook sysinit_end
# End of file
# vim: set ts=2 sw=2 noet:

View file

@ -19,7 +19,7 @@
# ==== Variables to set ====
# PLUGSCRIPTDIR has been replaced by the 'plugapps-scripts' package
INSTALLEDPKGS="base kernel26 kernel26-headers file heimdal ntfs-3g openssh openssl"
RELEASEVER=2010.12
RELEASEVER=2011.01
MAKETARGZ=1
MAKEUBIIMG=1
# ==== The Process ====