--- slack10/etc/rc.d/rc.M.orig 2005-01-25 19:24:29.000000000 +0100 +++ slack10/etc/rc.d/rc.M 2005-01-25 19:24:37.000000000 +0100 @@ -14,19 +14,6 @@ # Tell the viewers what's going to happen. echo "Going multiuser..." -# Screen blanks after 15 minutes idle time, and powers down in one hour -# if the kernel supports APM or ACPI power management: -/bin/setterm -blank 15 -powersave powerdown -powerdown 60 - -# Set the hostname. -if [ -r /etc/HOSTNAME ]; then - /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .) -else - # fall back on this old default: - echo "darkstar.example.net" > /etc/HOSTNAME - /bin/hostname darkstar -fi - # Save the contents of 'dmesg': /bin/dmesg -s 65536 > /var/log/dmesg @@ -35,40 +22,6 @@ . /etc/rc.d/rc.syslog start fi -# Initialize PCMCIA devices: -# -# NOTE: This used to be started near the top of rc.S so that PCMCIA devices -# could be fsck'ed along with the other drives. This had some unfortunate -# side effects, however, since root isn't yet read-write, and /var might not -# even be mounted the .pid files can't be correctly written in /var/run and -# the pcmcia system can't be correctly shut down. If you want some PCMCIA -# partition to be mounted at boot (or when the card is inserted) then add -# the appropriate lines to /etc/pcmcia/scsi.opts. -# -if [ -x /etc/rc.d/rc.pcmcia ] ; then - . /etc/rc.d/rc.pcmcia start - # The cards might need a little extra time here to initialize. - if [ -r /var/run/cardmgr.pid ]; then - sleep 5 - fi -fi - -# Initialize the networking hardware. If your network driver is a module -# and you haven't loaded it manually, this will be deferred until after -# the hotplug system loads the module below. -if [ -x /etc/rc.d/rc.inet1 ]; then - . /etc/rc.d/rc.inet1 -fi - -# Initialize the hotplugging subsystem for Cardbus, IEEE1394, PCI, and USB devices: -if [ -x /etc/rc.d/rc.hotplug -a -r /proc/modules ]; then - # Don't run hotplug if 'nohotplug' was given at boot. - if ! grep nohotplug /proc/cmdline 1> /dev/null 2> /dev/null ; then - echo "Activating hardware detection: /etc/rc.d/rc.hotplug start" - . /etc/rc.d/rc.hotplug start - fi -fi - # Start networking daemons: if [ -x /etc/rc.d/rc.inet2 ]; then . /etc/rc.d/rc.inet2 @@ -121,18 +74,6 @@ # /usr/sbin/smartd #fi -# Monitor the UPS with genpowerd. -# To use this, uncomment this section and edit your settings in -# /etc/genpowerd.conf (serial device, UPS type, etc). For more information, -# see "man genpowerd" or the extensive documentation in the -# /usr/doc/genpower-1.0.3 directory. -# You'll also need to configure a similar block in /etc/rc.d/rc.6 if you want -# support for stopping the UPS's inverter after the machine halts. -#if [ -x /sbin/genpowerd ]; then -# echo "Starting genpowerd daemon..." -# /sbin/genpowerd -#fi - # Turn on process accounting. To enable process accounting, make sure the # option for BSD process accounting is enabled in your kernel, and then # create the file /var/log/pacct (touch /var/log/pacct). By default, process @@ -189,24 +130,6 @@ . /etc/rc.d/rc.sendmail start fi -# Start the APM daemon if APM is enabled in the kernel: -if [ -x /usr/sbin/apmd ]; then - if cat /proc/apm 1> /dev/null 2> /dev/null ; then - echo "Starting APM daemon: /usr/sbin/apmd" - /usr/sbin/apmd - fi -fi - -# Start the ACPI (Advanced Configuration and Power Interface) daemon: -if [ -x /etc/rc.d/rc.acpid ]; then - . /etc/rc.d/rc.acpid start -fi - -# Load ALSA (sound) defaults: -if [ -x /etc/rc.d/rc.alsa ]; then - . /etc/rc.d/rc.alsa -fi - # Load a custom screen font if the user has an rc.font script. if [ -x /etc/rc.d/rc.font ]; then . /etc/rc.d/rc.font @@ -238,11 +161,6 @@ . /etc/rc.d/rc.samba start fi -# Start the GPM mouse server: -if [ -x /etc/rc.d/rc.gpm ]; then - . /etc/rc.d/rc.gpm start -fi - # If there are SystemV init scripts for this runlevel, run them. if [ -x /etc/rc.d/rc.sysvinit ]; then . /etc/rc.d/rc.sysvinit --- slack10/etc/rc.d/rc.6.orig 2004-06-21 18:32:03.000000000 +0200 +++ slack10/etc/rc.d/rc.6 2005-01-25 18:47:11.000000000 +0100 @@ -37,17 +37,6 @@ ;; esac -# Save the system time to the hardware clock using hwclock --systohc. -if [ -x /sbin/hwclock ]; then - if grep -q "^UTC" /etc/hardwareclock 2> /dev/null ; then - echo "Saving system time to the hardware clock (UTC)." - /sbin/hwclock --utc --systohc - else - echo "Saving system time to the hardware clock (localtime)." - /sbin/hwclock --localtime --systohc - fi -fi - # Stop the Apache web server: if [ -x /etc/rc.d/rc.httpd ]; then /etc/rc.d/rc.httpd stop @@ -68,18 +57,10 @@ /etc/rc.d/rc.nfsd stop fi -# If it looks like we use an initrd, prepare for one at next boot: -if grep -q -w initrd /var/log/messages ; then - mkdir -p /initrd -fi - # Unmount any NFS or SMB filesystems: echo "Unmounting remote filesystems." umount -a -r -t nfs,smbfs -# Try to kill dhcpcd so the DHCP leases can be returned: -killall -15 dhcpcd 1> /dev/null 2> /dev/null - # Try to shut down pppd: PS="$(ps ax)" if echo "$PS" | grep -q -w pppd ; then @@ -88,13 +69,6 @@ fi fi -# Shut down PCMCIA devices: -if [ -x /etc/rc.d/rc.pcmcia ] ; then - . /etc/rc.d/rc.pcmcia stop - # The cards might need a little extra time here to initialize. - sleep 5 -fi - # Turn off process accounting: if [ -x /sbin/accton -a -r /var/log/pacct ]; then echo "Turning off process accounting." @@ -130,72 +104,14 @@ fi chmod 600 /etc/random-seed -# Before unmounting file systems write a reboot or halt record to wtmp. -$command -w - # Clear /var/lock/subsys. if [ -d /var/lock/subsys ]; then rm -f /var/lock/subsys/* fi -# A function to deactivate LVM volume groups: -deactivate_lvm() { - if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then - echo "Deactivating LVM volume groups:" - if cat /proc/sys/kernel/osrelease | cut -f 1,2 -d . | grep -q -w 2.4 2> /dev/null ; then - /sbin/vgchange -an - else - /sbin/vgchange -an --ignorelockingfailure - fi - sleep 10 - fi -} - -# Turn off swap, then unmount local file systems. -echo "Turning off swap." -swapoff -a -sync - -echo "Unmounting local file systems." -# Don't remount UMSDOS root volumes: -if [ ! "$(mount | head -n 1 | cut -d ' ' -f 5)" = "umsdos" ]; then - umount -a -t nonfs,noproc,nosysfs - deactivate_lvm - umount -a -r -t nonfs,noproc,nosysfs - echo "Remounting root filesystem read-only." - mount -n -o remount,ro / -else - umount -a -t nonfs,noproc,nosysfs,noumsdos,nosmbfs - deactivate_lvm - umount -a -r -t nonfs,noproc,nosysfs,noumsdos,nosmbfs -fi - -# This never hurts: -sync - -# sleep 1 fixes problems with some hard drives that don't -# otherwise finish syncing before reboot or poweroff -sleep 1 - # This is to ensure all processes have completed on SMP machines: wait -if [ -x /sbin/genpowerd ]; then - # See if this is a powerfail situation: - if egrep -q "FAIL|SCRAM" /etc/upsstatus 2> /dev/null ; then - # Signal UPS to shut off the inverter: - /sbin/genpowerd -k - if [ ! $? = 0 ]; then - echo - echo "There was an error signaling the UPS." - echo "Perhaps you need to edit /etc/genpowerd.conf to configure" - echo "the serial line and UPS type." - # Wasting 15 seconds of precious power: - sleep 15 - fi - fi -fi - # Now halt (poweroff with APM or ACPI enabled kernels) or reboot. if [ "$command" = "reboot" ]; then echo "Rebooting."