-----BEGIN PGP SIGNED MESSAGE-----

On Thu, 11 Mar 1999 [EMAIL PROTECTED] wrote:

> Hi David,
> 
> >With the 2.0 series kernels (you should _really_ be using 2.0.36 for
> >security, 2.0.37 is due out in the near future) all you need to do is let
> >the system boot, have your setup scripts run the ipfwadm commands to setup
> >the filtering/masquerading rules and then run shutdown -h now. your system
> >shuts down but the kernel is still running.
> 
> So, how do you shutdown/reboot the machine after it's in this mode with no
> userspace to login? Just cycle the power?
>

Yep, you are at the same point you would be after a normal shutdown
command
 
> 
> >I have done this with
> >Slackware, with other distributions you will need to double check the
> >shutdown scripts to make sure they do not disable int interfaces. The easy
> >way to tell this is to start a ping on another machine, shutdown a test
> >machine and if the ping continues you should be set. I know that Redhat
> >specificly disables packet forwarding during shutdown and so I suspect
> >that it shuts down the interfaces as well.
> 
> I only have a Redhat distribution. Could you post the shutdown script from
> slackware, please?
> 

attached is the default slackware shutdown script, it is the rough
equivelant of the /etc/rc.d/rc6.d directory in redhat 

David Lang

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQEVAwUBNuiA7T7msCGEppcbAQHlEwgAra1JVgIq1j2e8TURcU9AzLo5MS9V9Soh
Aap5LDkK3D96zGy0UagWBaqf08R9KPIRauryY2vVDs/u0aWA75laL63N4h9csZla
y+AGQKPhLIXNk6XfY7l4rjXY938FeLuXCO00Bht6fEhc7ANGapkqplRRpqdfPHAo
fMJ6ADze03wKqoyzDSkTOhFG0GPhp3J+eD/mx2jx/LBe84By17MmXNCj9GEHCMwi
Q73NnVuGubC7+lj9Wkaotglg2gvSZjky7pYDenZnEIxhaz/dgyBXeFl+agvLjWEA
vr2wViE4vBx5BvwY8g07XwQiZ+uL5EC622kFInQNUcyeBGh/4E4RXw==
=vIw5
-----END PGP SIGNATURE-----
#! /bin/sh
#
# rc.6          This file is executed by init when it goes into runlevel
#               0 (halt) or runlevel 6 (reboot). It kills all processes,
#               unmounts file systems and then either halts or reboots.
#
# Version:      @(#)/etc/rc.d/rc.6      1.50    1994-01-15
#
# Author:       Miquel van Smoorenburg <[EMAIL PROTECTED]>
# Modified by:  Patrick J. Volkerding, <[EMAIL PROTECTED]>
#

  # Set the path.
  PATH=/sbin:/etc:/bin:/usr/bin

  # Set linefeed mode to avoid staircase effect.
  stty onlcr

  echo "Running shutdown script $0:"

  # Find out how we were called.
  case "$0" in
        *0)
                message="The system is halted."
                command="halt"
                ;;
        *6)
                message="Rebooting."
                command=reboot
                ;;
        *)
                echo "$0: call me as \"rc.0\" or \"rc.6\" please!"
                exit 1
                ;;
  esac

  # Kill all processes.
  # INIT is supposed to handle this entirely now, but this didn't always
  # work correctly without this second pass at killing off the processes.
  # Since INIT already notified the user that processes were being killed,
  # we'll avoid echoing this info this time around.
  if [ "$1" != "fast" ]; then # shutdown did not already kill all processes
    killall5 -15 
    killall5 -9
  fi

  # Try to turn off quota and accounting.
  if [ -x /usr/sbin/quotaoff ]
  then
        echo "Turning off quota."
        /usr/sbin/quotaoff -a
  fi
  if [ -x /sbin/accton ]
  then
        echo "Turning off accounting."
        /sbin/accton
  fi

  # Before unmounting file systems write a reboot or halt record to wtmp.
  $command -w

  # Save localtime
  [ -e /usr/lib/zoneinfo/localtime ] && cp /usr/lib/zoneinfo/localtime /etc

  # Asynchronously unmount any remote filesystems:
  echo "Unmounting remote filesystems."
  umount -a -tnfs &

  # Turn off swap, then unmount local file systems.
  echo "Turning off swap."
  swapoff -a
  echo "Unmounting local file systems."
  umount -a -tnonfs
  # Don't remount UMSDOS root volumes:
  if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
    mount -n -o remount,ro /
  fi

  # See if this is a powerfail situation.
  if [ -f /etc/power_is_failing ]; then
    echo "Turning off UPS, bye."
    /sbin/powerd -q
    exit 1
  fi

  # Now halt or reboot.
  echo "$message"
  [ ! -f /etc/fastboot ] && echo "On the next boot fsck will be FORCED."
  $command -f

Reply via email to