[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Modem Configuration Again!



Dale Scheetz writes:

>Back to the original problem. My /etc/init.d/boot script does not have the
>run-parts line in it. I do have the 0setserial script in /etc/rc.boot.
>Where should the run-parts line go? 
>Do you need to see a copy of what I have in /etc/init.d/boot? 

See below for the /etc/init.d/boot from muskogee, the more recently
installed of the two Debian machines I use; however its sysvinit
package is NOT the most recent available.  (Actually, that's a point.
Perhaps upgrading to the latest sysvinit package might make some
difference.)

Don't mindlessly copy things around; I believe there have been changes
in the way things work over the last few months.  Consider this to be
a hint only ;-)

You'll see `run-parts /etc/rc.boot' near the end.

>Can I just stick the setserial line in place of run-parts?

I think that would probably be a bad move.

#! /bin/sh
# /etc/init.d/boot: boot-time system configuration.
# $Id: boot,v 1.6 1995/06/22 19:32:55 imurdock Exp $
#
# Copyright (C) 1994, 1995 Debian Association, Inc.
# Written by Ian Murdock <imurdock@gnu.ai.mit.edu>.

PATH="/sbin:/bin:/usr/sbin:/usr/bin"

if [ -x /sbin/unconfigured.sh ]
then
  /sbin/unconfigured.sh
fi

echo
echo "Running /etc/init.d/boot..."
echo

# Ensure that bdflush (update) is running before any major I/O is
# performed (the following is a good example of such activity :).
update

# Check the integrity of all file systems (if not a fastboot).
if [ ! -f /fastboot ]
then
  # Ensure that root is quiescent and read-only before fsck'ing.
  mount -n -o remount,ro /
  if [ $? = 0 ]
  then
    echo "Checking file systems..."
    fsck -A -a
    # If there was a failure, drop into single-user mode.
    #
    # NOTE: "failure" is defined as exiting with a return code of
    # 2 or larger.  A return code of 1 indicates that file system
    # errors were corrected but that the boot may proceed.
    if [ $? -gt 1 ]
    then
      # Surprise! Re-directing from a HERE document (as in
      # "cat << EOF") won't work, because the root is read-only.
      echo
      echo "fsck failed.  Please repair manually and reboot.  Please note"
      echo "that the root file system is currently mounted read-only.  To"
      echo "remount it read-write:"
      echo
      echo "   bash# mount -n -o remount,rw /"
      echo
      echo "CONTROL-D will reboot the system."
      echo
      # Surprise! File descriptor 0 is _not_ open. Must run sh with
      # explicit redirection from /dev/console. /dev/tty won't work
      # because file descriptor 0 is not open to a tty.
      /bin/sh - < /dev/console
      sync
      reboot
    fi
    echo
  else
    echo "*** ERROR!  Cannot fsck because root is not read-only!"
    echo
  fi
else
  echo "*** WARNING!  File systems are NOT being checked!"
  echo
fi

# Remount the root file system in read-write mode.
mount -n -o remount,rw /

# Load the appropriate modules.
if [ -x /etc/init.d/modules ]
then
  /etc/init.d/modules
fi

# Remove /etc/mtab*, /etc/nologin, /fastboot and /var/run/utmp.
rm -f /etc/mtab* /etc/nologin /fastboot /var/run/utmp

# Mount local file systems in /etc/fstab.
echo "Mounting local file systems..."
mount -avt nonfs

# Activate the swap device(s) in /etc/fstab.
echo "Activating swap..."
swapon -a

# Establish TCP/IP connection.
if [ -x /etc/init.d/network ]
then
  /etc/init.d/network
fi

# Set hostname.
hostname --file /etc/hostname

# Now that TCP/IP is configured, mount the NFS file systems in /etc/fstab.
echo "Mounting remote file systems..."
mount -a -t nfs

# Set GMT="-u" if your system clock is set to GMT, and GMT=""
# if not.
GMT=""
# Set and adjust the CMOS clock.
clock -s $GMT
if [ ! -f /etc/adjtime ]
then
  echo "0.0 0 0.0" > /etc/adjtime
fi
clock -a $GMT

# Now that /usr/lib/zoneinfo should be available, announce the local time.
echo
echo "Local time: `date`"
echo

# Run the package-specific boot scripts in /etc/rc.boot.
run-parts /etc/rc.boot

# Wipe /tmp (and don't erase `lost+found', `quota.user' or `quota.group')!
echo -n "Cleaning up /tmp... "
( cd /tmp && \
  rm -rf [a-km-pr-zA-Z]* && \
  find . ! -name . ! -name lost+found ! -name quota.user ! -name quota.group \
    -exec rm -rf -- {} \; -type d -prune )
echo "done."

# Create /var/run/utmp so that we can login.
echo -n > /var/run/utmp

# Set pseudo-terminal access permissions.
chmod 666 /dev/tty[pqrs]*

# If /var/log/wtmp does not exist, create it.
if [ ! -f /var/log/wtmp ]
then
  echo -n > /var/log/wtmp
fi

# Update /etc/motd.
uname -a > /tmp/motd
sed 1d /etc/motd >> /tmp/motd
mv /tmp/motd /etc/motd

# Be compatible with older releases.
if [ -x /etc/init.d/compat ]
then
  /etc/init.d/compat
fi


Reply to: