Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

383 Commits   1 Branch   1 Tag
Index: rc.4
===================================================================
--- rc.4	(nonexistent)
+++ rc.4	(revision 5)
@@ -0,0 +1,58 @@
+#! /bin/sh
+#
+# rc.4          This file is executed by init(8) when the system is being
+#               initialized for run level 4 (XDM)
+#
+# Author:       Fred N. van Kempen,    <waltje@uwalt.nl.mugnet.org>
+# Modifyed by:  Patrick J. Volkerding, <volkerdi@slackware.com>,
+#               Andrey V. Kosteltsev,  <kx@radix.pro>
+#
+
+# Tell the viewers what's going to happen...
+echo "Starting up X11 session manager..."
+
+# If you'd like to start something different or in a different order than
+# the options below, create your own startup script /etc/rc.d/rc.4.local
+# and make it executable and it will be used instead:
+if [ -x /etc/rc.d/rc.4.local ]; then
+  exec /bin/bash /etc/rc.d/rc.4.local
+fi
+
+# Try to use GNOME's gdm session manager. This comes first because if gdm is on the
+# machine then the user probably installed it and wants to use it by default:
+if [ -x /usr/bin/gdm ]; then
+  exec /usr/bin/gdm -nodaemon
+fi
+
+# Someone thought that gdm looked prettier in /usr/sbin, so look there, too:
+if [ -x /usr/sbin/gdm ]; then
+  exec /usr/sbin/gdm -nodaemon
+fi
+
+# Not there?  OK, try to use KDE's kdm session manager:
+if [ -x /opt/kde/bin/kdm ]; then
+  exec /opt/kde/bin/kdm -nodaemon
+elif [ -x /usr/bin/kdm ]; then
+  exec /usr/bin/kdm -nodaemon
+fi
+
+# Look for SDDM as well:
+if [ -x /usr/bin/sddm ]; then
+  exec /usr/bin/sddm
+fi
+
+# If all you have is XDM, I guess it will have to do:
+if [ -x /usr/bin/xdm ]; then
+  exec /usr/bin/xdm -nodaemon
+elif [ -x /usr/X11R6/bin/xdm ]; then
+  exec /usr/X11R6/bin/xdm -nodaemon
+fi
+
+# error
+echo ""
+echo "Hey, you don't have GDM, KDM, SDDM or XDM. Can't use runlevel 4 without"
+echo "one of those installed."
+echo ""
+sleep 30
+
+# All done.
Index: rc.6
===================================================================
--- rc.6	(nonexistent)
+++ rc.6	(revision 5)
@@ -0,0 +1,427 @@
+#! /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.
+#
+# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
+# Modified by:  Patrick J. Volkerding,  <volkerdi@slackware.com>,
+#               Andrey V. Kosteltsev,   <kx@radix.pro>
+#
+
+# Set the path:
+PATH=/sbin:/usr/local/sbin:/bin:/usr/local/bin:/usr/sbin:/usr/bin
+
+# If there are SystemV init scripts for this runlevel, run them:
+if [ -x /etc/rc.d/rc.sysvinit ]; then
+  /etc/rc.d/rc.sysvinit
+fi
+
+# Set linefeed mode to avoid staircase effect:
+/bin/stty onlcr
+
+echo "Running shutdown script $0:"
+
+# Find out how we were called.
+case "$0" in
+  *0)
+    command="halt"
+    ;;
+  *6)
+    command=reboot
+    ;;
+   *)
+     echo "$0: call me as \"rc.0\" or \"rc.6\" please!"
+     exit 1
+     ;;
+esac
+
+# Restart init. This prevents init from hanging on to file handles for removed
+# glibc shared libraries in the case that those were upgraded or reinstalled.
+/sbin/telinit u
+
+# Save the system time to the hardware clock using hwclock --systohc.
+# This will also create or update the timestamps in /etc/adjtime.
+if [ -x /sbin/hwclock ]; then
+  # Check for a broken motherboard RTC clock (where ioports for rtc are unknown)
+  # to prevent hwclock causing a hang:
+  if ! grep -q " : rtc" /proc/ioports ; then
+    CLOCK_OPT="--directisa"
+  fi
+  if [ /etc/adjtime -nt /etc/hardwareclock ]; then
+    if grep -q "^LOCAL" /etc/adjtime ; then
+      echo "Saving system time to the hardware clock (localtime)."
+    else
+      echo "Saving system time to the hardware clock (UTC)."
+    fi
+    /sbin/hwclock $CLOCK_OPT --systohc
+  elif grep -q "^UTC" /etc/hardwareclock 2> /dev/null ; then
+    echo "Saving system time to the hardware clock (UTC)."
+    if [ ! -r /etc/adjtime ]; then
+      echo "Creating system time correction file /etc/adjtime."
+    fi
+    /sbin/hwclock $CLOCK_OPT --utc --systohc
+  else
+    echo "Saving system time to the hardware clock (localtime)."
+    if [ ! -r /etc/adjtime ]; then
+      echo "Creating system time correction file /etc/adjtime."
+    fi
+    /sbin/hwclock $CLOCK_OPT --localtime --systohc
+  fi
+fi
+
+# Run any local shutdown scripts:
+if [ -x /etc/rc.d/rc.local_shutdown ]; then
+  /etc/rc.d/rc.local_shutdown stop
+fi
+
+# Stop the Icecream daemon::
+if [ -x /etc/rc.d/rc.iceccd ]; then
+  /etc/rc.d/rc.iceccd stop
+fi
+
+# Stop the Icecream scheduler:
+if [ -x /etc/rc.d/rc.icecc-scheduler ]; then
+  /etc/rc.d/rc.icecc-scheduler stop
+fi
+
+# Stop the GPM mouse server:
+if [ -x /etc/rc.d/rc.gpm ]; then
+  /etc/rc.d/rc.gpm stop
+fi
+
+# Stop Samba:
+if [ -x /etc/rc.d/rc.samba ]; then
+  /etc/rc.d/rc.samba stop
+fi
+
+# Stop Dovecot:
+if [ -x /etc/rc.d/rc.dovecot ]; then
+  /etc/rc.d/rc.dovecot stop
+fi
+
+# Stop local LDAP name service daemon (from nss-pam-ldapd):
+if [ -x /etc/rc.d/rc.nslcd ]; then
+  /etc/rc.d/rc.nslcd stop
+fi
+
+# Shut down OpenLDAP:
+if [ -x /etc/rc.d/rc.openldap ]; then
+  /etc/rc.d/rc.openldap stop
+fi
+
+# Stop the Apache web server:
+if [ -x /etc/rc.d/rc.httpd ]; then
+  /etc/rc.d/rc.httpd stop
+fi
+
+# Stop Nginx server:
+if [ -x /etc/rc.d/rc.nginx ]; then
+  /etc/rc.d/rc.nginx stop
+fi
+
+# Stop Message broker RabbitMQ
+if [ -x /etc/rc.d/rc.rabbitmq ]; then
+  /etc/rc.d/rc.rabbitmq stop
+fi
+
+# Stop key-value store Redis
+if [ -x /etc/rc.d/rc.redis ]; then
+  /etc/rc.d/rc.redis stop
+fi
+
+# Stop uWSGI for cGit server:
+if [ -x /etc/rc.d/rc.cgit-uwsgi ]; then
+  /etc/rc.d/rc.cgit-uwsgi stop
+fi
+
+# Stop FastCGI PHP server:
+if [ -x /etc/rc.d/rc.php-fpm ]; then
+  /etc/rc.d/rc.php-fpm stop
+fi
+
+# Stop postgres
+if [ -x /etc/rc.d/rc.postgresql ]; then
+  /etc/rc.d/rc.postgresql stop
+fi
+
+# Stop the MySQL database:
+if [ -x /etc/rc.d/rc.mysqld -a -r /var/run/mysql/mysql.pid ]; then
+  /etc/rc.d/rc.mysqld stop
+fi
+
+# Stop the Tomcat daemon:
+if [ -x /etc/rc.d/rc.tomcat ]; then
+  /etc/rc.d/rc.tomcat stop
+fi
+
+# Shut down the Memcached daemon:
+if [ -x /etc/rc.d/rc.memcached ]; then
+  /etc/rc.d/rc.memcached stop
+fi
+
+# Stop the mail server:
+if [ -x /etc/rc.d/rc.sendmail -a -x usr/sbin/makemap ]; then
+  /etc/rc.d/rc.sendmail stop
+elif [ -x /etc/rc.d/rc.postfix -a -x usr/sbin/postdrop ]; then
+  /etc/rc.d/rc.postfix stop
+fi
+
+# Shut down the IMAP daemon:
+if [ -x /etc/rc.d/rc.cyrus-imapd ]; then
+  /etc/rc.d/rc.cyrus-imapd stop
+fi
+
+# Shut down the SASL authentication daemon:
+if [ -x /etc/rc.d/rc.saslauthd ]; then
+  /etc/rc.d/rc.saslauthd stop
+fi
+
+# Stop the haveged entropy daemon:
+if [ -x /etc/rc.d/rc.haveged ]; then
+  /etc/rc.d/rc.haveged stop
+fi
+
+# Kill any processes (typically gam) that would otherwise prevent
+# unmounting NFS volumes:
+unset FUSER_DELAY
+for dir in $(/bin/mount | grep -e 'type nfs ' -e 'type nfs4 ' | sed -e 's|.* on ||g' | cut -d ' ' -f 1) ; do
+  echo "Killing processes holding NFS mount $dir open..."
+  # Background this to prevent fuser from also blocking shutdown:
+  /usr/bin/fuser -k -M -m "$dir" &
+  FUSER_DELAY=5
+done
+# If fuser was run, let it have some delay:
+if [ ! -z "$FUSER_DELAY" ]; then
+  sleep $FUSER_DELAY
+fi
+
+# Unmount any NFS, SMB, or CIFS filesystems:
+echo "Unmounting remote filesystems:"
+/bin/umount -v -a -l -f -r -t nfs,nfs4,smbfs,cifs | tr -d ' ' | grep successfully | sed "s/:successfullyunmounted/ has been successfully unmounted./g"
+
+# Stop D-Bus:
+if [ -x /etc/rc.d/rc.messagebus ]; then
+  /etc/rc.d/rc.messagebus stop
+fi
+
+# Try to shut down pppd:
+PS="$(ps ax)"
+if echo "$PS" | /bin/grep -q -w pppd ; then
+  if [ -x /usr/sbin/ppp-off ]; then
+    /usr/sbin/ppp-off
+  fi
+fi
+
+# Shut down the NFS server:
+if [ -x /etc/rc.d/rc.nfsd ]; then
+  /etc/rc.d/rc.nfsd stop
+fi
+
+# Shut down OpenVPN:
+if [ -x /etc/rc.d/rc.openvpn ]; then
+  /etc/rc.d/rc.openvpn stop
+fi
+
+# Shut down YP services:
+if [ -x /etc/rc.d/rc.yp ]; then
+  if grep -wq stop /etc/rc.d/rc.yp ; then
+    /etc/rc.d/rc.yp stop
+  fi
+fi
+
+# Shut down the BIND name server daemon:
+if [ -x /etc/rc.d/rc.bind ]; then
+  /etc/rc.d/rc.bind stop
+fi
+
+# Shut down the SSH server:
+if [ -x /etc/rc.d/rc.sshd ]; then
+  /etc/rc.d/rc.sshd stop
+fi
+
+# Shut down the inetd server:
+if [ -x /etc/rc.d/rc.inetd ]; then
+  /etc/rc.d/rc.inetd stop
+fi
+
+# Bring down the networking system, but first make sure that this
+# isn't a diskless client with the / partition mounted via NFS:
+if ! /bin/mount | /bin/grep -q -e 'on / type nfs' -e 'on / type nfs4' ; then
+  if [ -x /etc/rc.d/rc.inet1 ]; then
+    /etc/rc.d/rc.inet1 stop
+  fi
+fi
+
+# In case dhcpcd might have been manually started on the command line,
+# look for the .pid file, and shut dhcpcd down if it's found:
+if /bin/ls /etc/dhcpc/*.pid 1> /dev/null 2> /dev/null ; then
+  /sbin/dhcpcd -k 1> /dev/null 2> /dev/null
+  # A little time for /etc/resolv.conf and/or other files to
+  # restore themselves.
+  sleep 2
+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 deactivate:
+  /bin/sleep 5
+fi
+
+# Turn off process accounting:
+if [ -x /sbin/accton -a -r /var/log/pacct ]; then
+  /sbin/accton off
+fi
+
+# Terminate acpid before syslog:
+if [ -x /etc/rc.d/rc.acpid -a -r /var/run/acpid.pid ]; then # quit
+  /etc/rc.d/rc.acpid stop
+fi
+
+# Stop udev:
+if [ -x /etc/rc.d/rc.udev ]; then
+  /etc/rc.d/rc.udev force-stop
+fi
+
+# Kill all remaining processes:
+OMITPIDS="$(for p in $(pgrep mdmon); do echo -o $p; done)" # Don't kill mdmon
+if [ ! "$1" = "fast" ]; then
+  echo "Sending all processes the SIGTERM signal."
+  /sbin/killall5 -15 $OMITPIDS
+  /bin/sleep 5
+  echo "Sending all processes the SIGKILL signal."
+  /sbin/killall5 -9 $OMITPIDS
+fi
+
+# Try to turn off quota:
+if /bin/grep -q quota /etc/fstab ; then
+  if [ -x /sbin/quotaoff ]; then
+    echo "Turning off filesystem quotas."
+    /sbin/quotaoff -a
+  fi
+fi
+
+# Carry a random seed between reboots:
+echo "Saving random seed from /dev/urandom in /etc/random-seed."
+# Use the pool size from /proc, or 4096 bits:
+if [ -r /proc/sys/kernel/random/poolsize ]; then
+  /bin/dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(expr $(cat /proc/sys/kernel/random/poolsize) / 8) 2> /dev/null
+else
+  /bin/dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
+fi
+/bin/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
+
+# Turn off swap:
+echo "Turning off swap:"
+/sbin/swapoff -a
+/bin/sync
+
+# Umount all tmpfs mounts except /dev/shm and under /run:
+cat /proc/mounts | grep " tmpfs " | grep -v -e " /run " -e " /run/" -e " /dev/shm " | while read mount ; do
+  umount --recursive -v $(echo $mount | cut -f 2 -d ' ') 2> /dev/null
+done
+
+echo "Unmounting local file systems:"
+/bin/umount -v -a -t no,proc,sysfs,devtmpfs,fuse.gvfsd-fuse,tmpfs
+
+# JFS needs a sync here or the / partition cannot be remounted read-only.
+# In spite of this, it seems that a JFS root partition will always be checked
+# (and found to be clean) at boot:
+/bin/sync
+
+echo "Remounting root filesystem read-only:"
+/bin/mount -v -n -o remount,ro /
+
+# This never hurts:
+/bin/sync
+
+# Close any volumes opened by cryptsetup:
+if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then
+  cat /etc/crypttab | grep -v "^#" | grep -v "^$" | while read line; do
+    # NOTE: we only support LUKS formatted volumes (except for swap)!
+    LUKS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f1 -d' ')
+    DEV=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f2 -d' ')
+    OPTS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f4 -d' ')
+    if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then
+      echo "Locking LUKS crypt volume '${LUKS}':"
+      /sbin/cryptsetup luksClose ${LUKS}
+    elif echo $OPTS | grep -wq swap ; then
+      # If any of the volumes was used as encrypted swap,
+      # then run mkswap on the underlying device -
+      # in case other Linux installations on this computer should use it:
+      echo "Erasing encrypted swap '${LUKS}' and restoring normal swap on ${DEV}:"
+      /sbin/cryptsetup remove ${LUKS}
+      mkswap $DEV
+    fi
+  done
+fi
+
+# Deactivate LVM volume groups:
+if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then
+  echo "Deactivating LVM volume groups:"
+  /sbin/vgchange -an
+fi
+
+# This never hurts again (especially since root-on-LVM always fails
+# to deactivate the / logical volume...  but at least it was
+# remounted as read-only first)
+/bin/sync
+
+# sleep 3 fixes problems with some hard drives that don't
+# otherwise finish syncing before reboot or poweroff
+/bin/sleep 3
+
+# 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 /bin/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:
+      /bin/sleep 15
+    fi
+  fi
+fi
+
+#
+# APC UPS Daemon:
+#
+# This will cause the UPS to kill the power supply after a configurable number
+# of seconds (see the apcupsd.conf file).  This is important for situations
+# where the mains power comes back before the UPS batteries are completely
+# dead.
+#if [ -f /etc/apcupsd/powerfail ]; then
+#  echo
+#  echo "apcupsd will now power off the UPS"
+#  echo
+#  /etc/apcupsd/apccontrol killpower
+#  echo
+#  echo "Please ensure that the UPS has powered off before rebooting."
+#  echo "Otherwise, the UPS may cut the power during the reboot."
+#  echo
+#  halt -f -p         # power down the system if the hardware is capable
+#fi
+
+# Now halt (poweroff with APM or ACPI enabled kernels) or reboot.
+if [ "$command" = "reboot" ]; then
+  echo "Rebooting."
+  /sbin/reboot
+else
+  /sbin/poweroff
+fi
Index: rc.K
===================================================================
--- rc.K	(nonexistent)
+++ rc.K	(revision 5)
@@ -0,0 +1,204 @@
+#! /bin/sh
+#
+# rc.K          This file is executed by init when it goes into runlevel 1,
+#               which is the administrative state. It kills all daemons and
+#               then puts the system into single user mode. Note that the
+#               file systems are kept mounted.
+#
+# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
+# Modified by:  Patrick J. Volkerding,  <volkerdi@slackware.com>,
+#               Andrey V. Kosteltsev,   <kx@radix.pro>
+#
+
+# Set the path.
+PATH=/sbin:/usr/local/sbin:/bin:/usr/local/bin:/usr/sbin:/usr/bin
+
+# 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
+fi
+
+# Load any needed keyboard mappings:
+if [ -x /etc/rc.d/rc.keymap ]; then
+  /etc/rc.d/rc.keymap
+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
+fi
+
+# Try to turn off quota:
+if grep -q quota /etc/fstab ; then
+  if [ -x /sbin/quotaoff ]; then
+    echo "Turning off filesystem quotas."
+    /sbin/quotaoff -a
+  fi
+fi
+
+# Try to turn off accounting:
+if [ -x /sbin/accton -a -r /var/log/pacct ]; then
+  /sbin/accton off
+fi
+
+# Run any local shutdown scripts:
+if [ -x /etc/rc.d/rc.local_shutdown ]; then
+  /etc/rc.d/rc.local_shutdown stop
+fi
+
+# Stop the Apache web server:
+if [ -x /etc/rc.d/rc.httpd ]; then
+  /etc/rc.d/rc.httpd stop
+fi
+
+# Stop Nginx server:
+if [ -x /etc/rc.d/rc.nginx ]; then
+  /etc/rc.d/rc.nginx stop
+fi
+
+# Stop Message broker RabbitMQ
+if [ -x /etc/rc.d/rc.rabbitmq ]; then
+  /etc/rc.d/rc.rabbitmq stop
+fi
+
+# Stop key-value store Redis
+if [ -x /etc/rc.d/rc.redis ]; then
+  /etc/rc.d/rc.redis stop
+fi
+
+# Stop uWSGI for cGit server:
+if [ -x /etc/rc.d/rc.cgit-uwsgi ]; then
+  /etc/rc.d/rc.cgit-uwsgi stop
+fi
+
+# Stop FastCGI PHP server:
+if [ -x /etc/rc.d/rc.php-fpm ]; then
+  /etc/rc.d/rc.php-fpm stop
+fi
+
+# Stop postgres
+if [ -x /etc/rc.d/rc.postgresql ]; then
+  /etc/rc.d/rc.postgresql stop
+fi
+
+# Stop the MySQL database:
+if [ -r /var/run/mysql/mysql.pid ]; then
+  /etc/rc.d/rc.mysqld stop
+fi
+
+# Stop the Samba server:
+if [ -x /etc/rc.d/rc.samba ]; then
+  /etc/rc.d/rc.samba stop
+fi
+
+# Shut down the NFS server:
+if [ -x /etc/rc.d/rc.nfsd ]; then
+  /etc/rc.d/rc.nfsd stop
+fi
+
+# Shut down the SSH server:
+if [ -x /etc/rc.d/rc.sshd ]; then
+  /etc/rc.d/rc.sshd stop
+fi
+
+# Stop the Tomcat daemon:
+if [ -x /etc/rc.d/rc.tomcat ]; then
+  . /etc/rc.d/rc.tomcat stop
+fi
+
+# Shut down the Memcached daemon:
+if [ -x /etc/rc.d/rc.memcached ]; then
+  /etc/rc.d/rc.memcached stop
+fi
+
+# Shut down the Postfix daemon:
+if [ -x /etc/rc.d/rc.postfix ]; then
+  /etc/rc.d/rc.postfix stop
+fi
+
+# Shut down the IMAP daemon:
+if [ -x /etc/rc.d/rc.cyrus-imapd ]; then
+  /etc/rc.d/rc.cyrus-imapd stop
+fi
+
+# Shut down the SASL authentication daemon:
+if [ -x /etc/rc.d/rc.saslauthd ]; then
+  /etc/rc.d/rc.saslauthd stop
+fi
+
+# Shut down OpenLDAP:
+if [ -x /etc/rc.d/rc.openldap ]; then
+  /etc/rc.d/rc.openldap stop
+fi
+
+# Stop D-Bus:
+if [ -x /etc/rc.d/rc.messagebus ]; then
+  sh /etc/rc.d/rc.messagebus stop
+fi
+
+# Kill any processes (typically gam) that would otherwise prevent
+# unmounting NFS volumes:
+unset FUSER_DELAY
+for dir in $(/bin/mount | grep -e 'type nfs ' -e 'type nfs4 ' | sed -e 's|.* on ||g' | cut -d ' ' -f 1) ; do
+  echo "Killing processes holding NFS mount $dir open..."
+  # Background this to prevent fuser from also blocking shutdown:
+  /usr/bin/fuser -k -M -m "$dir" &
+  FUSER_DELAY=5
+done
+# If fuser was run, let it have some delay:
+if [ ! -z "$FUSER_DELAY" ]; then
+  sleep $FUSER_DELAY
+fi
+
+# Unmount any NFS, SMB, or CIFS filesystems:
+echo "Unmounting remote filesystems:"
+/bin/umount -v -a -l -f -r -t nfs,nfs4,smbfs,cifs | tr -d ' ' | grep successfully | sed "s/:successfullyunmounted/ has been successfully unmounted./g"
+
+# 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 deactivate:
+  sleep 5
+fi
+
+# Terminate acpid before syslog:
+if [ -x /etc/rc.d/rc.acpid -a -r /var/run/acpid.pid ]; then # quit
+  /etc/rc.d/rc.acpid stop
+fi
+
+# Terminate ntpd before syslog:
+if [ -x /etc/rc.d/rc.ntpd -a -r /var/run/ntpd.pid ]; then # quit
+  sh /etc/rc.d/rc.ntpd stop
+fi
+
+# Kill all processes.
+OMITPIDS="$(for p in $(pgrep mdmon); do echo -o $p; done)" # Don't kill mdmon
+echo
+echo "Sending all processes the SIGHUP signal."
+killall5 -1 $OMITPIDS
+echo -n "Waiting for processes to hang up"
+for loop in 0 1 2 3 4 5 ; do
+  sleep 1
+  echo -n "."
+done
+echo
+echo "Sending all processes the SIGTERM signal."
+killall5 -15 $OMITPIDS
+echo -n "Waiting for processes to terminate"
+for loop in 0 1 2 3 4 5 ; do
+  sleep 1
+  echo -n "."
+done
+echo
+echo "Sending all processes the SIGKILL signal."
+killall5 -9 $OMITPIDS
+echo -n "Waiting for processes to exit"
+for loop in 0 1 2 3 4 5 ; do
+  sleep 1
+  echo -n "."
+done
+echo
+
+# Now go to the single user level
+echo "Going to single user mode..."
+/sbin/telinit -t 1 1
Index: rc.M.in
===================================================================
--- rc.M.in	(nonexistent)
+++ rc.M.in	(revision 5)
@@ -0,0 +1,566 @@
+#!/bin/sh
+#
+# rc.M          This file is executed by init(8) when the system is being
+#               initialized for one of the "multi user" run levels (i.e.
+#               levels 1 through 6).  It usually does mounting of file
+#               systems et al.
+#
+# Author:       Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+# Modified by:  Patrick Volkerding, <volkerdi@slackware.com>,
+#               Andrey V. Kosteltsev,  <kx@radix.pro>
+#
+
+# Tell the viewers what's going to happen.
+echo "Going multiuser..."
+
+# Update all the shared library links:
+if [ -x /sbin/ldconfig ]; then
+  echo "Updating shared library links:  /sbin/ldconfig &"
+  /sbin/ldconfig &
+fi
+
+#
+# create cracklib dictionary on first start up:
+#
+extra_words=
+if [ -x /bin/hostname ] ; then
+  echo `/bin/hostname` >> /usr/share/dict/host-name
+  extra_words=/usr/share/dict/host-name
+fi
+
+if [ ! -r var/cache/cracklib/pq_dict.hwm -o \
+     ! -r var/cache/cracklib/pq_dict.pwd -o \
+     ! -r var/cache/cracklib/pq_dict.pwi    ]; then
+  LD_PRELOAD=/usr/lib/libcrack.so \
+    /sbin/create-cracklib-dict -o /var/cache/cracklib/pq_dict /usr/share/dict/cracklib ${extra_words}
+fi
+
+# Call the setterm init script to set screen blanking and power management defaults:
+if [ -x /etc/rc.d/rc.setterm ]; then
+  /etc/rc.d/rc.setterm
+fi
+
+# Set the hostname.
+if [ -r /etc/HOSTNAME ]; then
+  /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)
+else
+  # fall back on this old default:
+  echo "@HARDWARE@.example.org" > /etc/HOSTNAME
+  /bin/hostname radix
+fi
+
+# Set the permissions on /var/log/dmesg according to whether the kernel
+# permits non-root users to access kernel dmesg information:
+if [ -r /proc/sys/kernel/dmesg_restrict ]; then
+  if [ $(cat /proc/sys/kernel/dmesg_restrict) = 1 ]; then
+    touch /var/log/dmesg
+    chmod 640 /var/log/dmesg
+  fi
+else
+  touch /var/log/dmesg
+  chmod 644 /var/log/dmesg
+fi
+# Save the contents of 'dmesg':
+/bin/dmesg -s 65536 > /var/log/dmesg
+
+# 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.
+#
+# Note that the stuff in /etc/pcmcia/ is only for 2.4.x kernels using
+# 16-bit PCMCIA cards (not 32-bit Cardbus cards!).  For example, with a
+# wireless card you might need to set options in /etc/pcmcia OR in
+# /etc/rc.d/rc.wireless.conf, or even in /etc/rc.d/rc.inet1.conf (with
+# extra options if needed for the encryption key, ESSID, etc.)
+#
+# Hopefully this situation will be unified in the future, but for now
+# that's how it is...
+#
+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.
+  sleep 5
+fi
+
+# Start the system logger:
+if [ -x /etc/rc.d/rc.syslog ]; then
+  /etc/rc.d/rc.syslog start
+fi
+
+
+#######
+####### Update the X font indexes (check fonts.dir, fonts.scale also):
+#######
+
+if [ -d /usr/share/fonts/100dpi ] ; then
+  if [ ! -r /usr/share/fonts/100dpi/fonts.dir -o ! -r /usr/share/fonts/100dpi/fonts.scale ] ; then
+    if [ -x /usr/bin/mkfontscale -a -x /usr/bin/mkfontdir ] ; then
+      echo "Updating fonts.dir, fonts.scale in /usr/share/fonts/100dpi directory"
+      ( cd /usr/share/fonts/100dpi ; /usr/bin/mkfontscale . ; /usr/bin/mkfontdir . )
+    fi
+  fi
+fi
+if [ -d /usr/share/fonts/75dpi ] ; then
+  if [ ! -r /usr/share/fonts/75dpi/fonts.dir -o ! -r /usr/share/fonts/75dpi/fonts.scale ] ; then
+    if [ -x /usr/bin/mkfontscale -a -x /usr/bin/mkfontdir ] ; then
+      echo "Updating fonts.dir, fonts.scale in /usr/share/fonts/75dpi directory"
+      ( cd /usr/share/fonts/75dpi ; /usr/bin/mkfontscale . ; /usr/bin/mkfontdir . )
+    fi
+  fi
+fi
+if [ -d /usr/share/fonts/OTF ] ; then
+  if [ ! -r /usr/share/fonts/OTF/fonts.dir -o ! -r /usr/share/fonts/OTF/fonts.scale ] ; then
+    if [ -x /usr/bin/mkfontscale -a -x /usr/bin/mkfontdir ] ; then
+      echo "Updating fonts.dir, fonts.scale in /usr/share/fonts/OTF directory"
+      ( cd /usr/share/fonts/OTF ; /usr/bin/mkfontscale . ; /usr/bin/mkfontdir . )
+    fi
+  fi
+fi
+if [ -d /usr/share/fonts/Speedo ] ; then
+  if [ ! -r /usr/share/fonts/Speedo/fonts.dir -o ! -r /usr/share/fonts/Speedo/fonts.scale ] ; then
+    if [ -x /usr/bin/mkfontscale -a -x /usr/bin/mkfontdir ] ; then
+      echo "Updating fonts.dir, fonts.scale in /usr/share/fonts/Speedo directory"
+      ( cd /usr/share/fonts/Speedo ; /usr/bin/mkfontscale . ; /usr/bin/mkfontdir . )
+    fi
+  fi
+fi
+if [ -d /usr/share/fonts/TTF ] ; then
+  if [ ! -r /usr/share/fonts/TTF/fonts.dir -o ! -r /usr/share/fonts/TTF/fonts.scale ] ; then
+    if [ -x /usr/bin/mkfontscale -a -x /usr/bin/mkfontdir ] ; then
+      echo "Updating fonts.dir, fonts.scale in /usr/share/fonts/TTF directory"
+      ( cd /usr/share/fonts/TTF ; /usr/bin/mkfontscale . ; /usr/bin/mkfontdir . )
+    fi
+  fi
+fi
+if [ -d /usr/share/fonts/Type1 ] ; then
+  if [ ! -r /usr/share/fonts/Type1/fonts.dir -o ! -r /usr/share/fonts/Type1/fonts.scale ] ; then
+    if [ -x /usr/bin/mkfontscale -a -x /usr/bin/mkfontdir ] ; then
+      echo "Updating fonts.dir, fonts.scale in /usr/share/fonts/Type1 directory"
+      ( cd /usr/share/fonts/Type1 ; /usr/bin/mkfontscale . ; /usr/bin/mkfontdir . )
+    fi
+  fi
+fi
+if [ -d /usr/share/fonts/cyrillic ] ; then
+  if [ ! -r /usr/share/fonts/cyrillic/fonts.dir -o ! -r /usr/share/fonts/cyrillic/fonts.scale ] ; then
+    if [ -x /usr/bin/mkfontscale -a -x /usr/bin/mkfontdir ] ; then
+      echo "Updating fonts.dir, fonts.scale in /usr/share/fonts/cyrillic directory"
+      ( cd /usr/share/fonts/cyrillic ; /usr/bin/mkfontscale . ; /usr/bin/mkfontdir . )
+    fi
+  fi
+fi
+if [ -d /usr/share/fonts/terminus ] ; then
+  if [ ! -r /usr/share/fonts/terminus/fonts.dir -o ! -r /usr/share/fonts/terminus/fonts.scale ] ; then
+    if [ -x /usr/bin/mkfontscale -a -x /usr/bin/mkfontdir ] ; then
+      echo "Updating fonts.dir, fonts.scale in /usr/share/fonts/terminus directory"
+      ( cd /usr/share/fonts/terminus ; /usr/bin/mkfontscale . ; /usr/bin/mkfontdir . )
+    fi
+  fi
+fi
+if [ -d /usr/share/fonts/misc ] ; then
+  if [ ! -r /usr/share/fonts/misc/fonts.dir -o ! -r /usr/share/fonts/misc/fonts.scale ] ; then
+    if [ -x /usr/bin/mkfontscale -a -x /usr/bin/mkfontdir ] ; then
+      echo "Updating fonts.dir, fonts.scale in /usr/share/fonts/misc directory"
+      ( cd /usr/share/fonts/misc ; /usr/bin/mkfontscale . ; /usr/bin/mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . )
+    fi
+  fi
+fi
+
+if [ -x /usr/bin/fc-cache ]; then
+  echo "Updating X font indexes:  /usr/bin/fc-cache -f &"
+  /usr/bin/fc-cache -f &
+fi
+
+
+#######
+####### Update the ca-certificates at first system boot:
+#######
+
+if [ -d /etc/ssl/certs ] ; then
+  if [ ! -r /etc/ssl/certs/ca-certificates.crt -a -x /usr/sbin/update-ca-certificates ] ; then
+    echo "Updating ca-certificates in /etc/ssl/certs directory"
+    /usr/sbin/update-ca-certificates
+  fi
+fi
+
+
+# Run rc.udev again.  This will start udev if it is not already running
+# (for example, upon return from runlevel 1), otherwise it will trigger it
+# to look for device changes and to generate persistent rules if needed.
+if grep -wq sysfs /proc/mounts && grep -q devtmpfs /proc/filesystems ; then
+  if ! grep -wq nohotplug /proc/cmdline ; then
+    if [ -x /etc/rc.d/rc.udev ]; then
+      /bin/sh /etc/rc.d/rc.udev start
+    fi
+  fi
+fi
+
+# Start the haveged entropy daemon:
+if [ -x /etc/rc.d/rc.haveged ]; then
+  /etc/rc.d/rc.haveged start
+fi
+
+# Start the rngd entropy daemon:
+if [ -x /etc/rc.d/rc.rngd ]; then
+  /etc/rc.d/rc.rngd start
+fi
+
+
+# Initialize the networking hardware:
+if [ -x /etc/rc.d/rc.inet1 ]; then
+  /etc/rc.d/rc.inet1
+fi
+
+# Start D-Bus:
+if [ -x /etc/rc.d/rc.messagebus ]; then
+  /etc/rc.d/rc.messagebus start
+fi
+
+# Start the session/seat daemon:
+if [ -x /etc/rc.d/rc.elogind -a -x /bin/loginctl ]; then
+  /etc/rc.d/rc.elogind start
+elif [ -x /etc/rc.d/rc.consolekit -a -x /usr/sbin/console-kit-daemon ]; then
+  /etc/rc.d/rc.consolekit start
+fi
+
+# Start Bluetooth:
+if [ -x /etc/rc.d/rc.bluetooth ]; then
+  /etc/rc.d/rc.bluetooth start
+fi
+
+# Start wicd or networkmanager:
+if [ -x /etc/rc.d/rc.wicd -a -x /usr/sbin/wicd ]; then
+  /etc/rc.d/rc.wicd start
+elif [ -x /etc/rc.d/rc.networkmanager ]; then
+  /etc/rc.d/rc.networkmanager start
+fi
+
+# Start networking daemons:
+if [ -x /etc/rc.d/rc.inet2 ]; then
+  /etc/rc.d/rc.inet2
+fi
+
+# Mount any additional filesystem types that haven't already been mounted:
+mount -a -v 2> /dev/null | grep -v -e "already mounted" -e "ignored" | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep "${dev} " ; done
+
+# Start the Control Script for automounter:
+if [ -x /etc/rc.d/rc.autofs ]; then
+  /etc/rc.d/rc.autofs start
+fi
+
+# Start the Network Time Protocol daemon:
+if [ -x /etc/rc.d/rc.ntpd ]; then
+  /etc/rc.d/rc.ntpd start
+fi
+
+# Remove stale locks and junk files (must be done after mount -a!)
+/bin/rm -f /var/lock/* /var/spool/uucp/LCK..* /tmp/.X*lock /tmp/.X11-unix/* /tmp/core /core 2> /dev/null
+/bin/rm -rf /var/spool/cron/cron.?????? 2> /dev/null
+
+# Remove stale hunt sockets so the game can start.
+if [ -r /tmp/hunt -o -r /tmp/hunt.stats ]; then
+  echo "Removing your stale hunt sockets from /tmp."
+  /bin/rm -f /tmp/hunt*
+fi
+
+# Ensure basic filesystem permissions sanity.
+chmod 755 / 2> /dev/null
+chmod 1777 /tmp /var/tmp
+
+# Start ACPI daemon.
+if [ -x /etc/rc.d/rc.acpid ]; then
+  /etc/rc.d/rc.acpid start
+fi
+
+# Enable CPU frequency scaling:
+if [ -x /etc/rc.d/rc.cpufreq ]; then
+  /etc/rc.d/rc.cpufreq start
+fi
+
+# Update any existing icon cache files:
+if find /usr/share/icons -maxdepth 2 2> /dev/null | grep -q icon-theme.cache ; then
+  for theme_dir in /usr/share/icons/* ; do
+    if [ -r ${theme_dir}/icon-theme.cache ]; then
+      echo "Updating icon-theme.cache in ${theme_dir}..."
+      /usr/bin/gtk-update-icon-cache -t -f ${theme_dir} 1> /dev/null 2> /dev/null &
+    fi
+  done
+  # This would be a large file and probably shouldn't be there.
+  if [ -r /usr/share/icons/icon-theme.cache ]; then
+    echo "Deleting icon-theme.cache in /usr/share/icons..."
+    #/usr/bin/gtk-update-icon-cache -t -f /usr/share/icons 1> /dev/null 2> /dev/null &
+    rm -f /usr/share/icons/icon-theme.cache
+  fi
+fi
+
+# Update mime database:
+if [ -x /usr/bin/update-mime-database -a -d /usr/share/mime ]; then
+  echo "Updating MIME database:  /usr/bin/update-mime-database /usr/share/mime &"
+  /usr/bin/update-mime-database /usr/share/mime 1> /dev/null 2> /dev/null &
+fi
+
+# Start HAL:
+if [ -x /etc/rc.d/rc.hald ]; then
+  sh /etc/rc.d/rc.hald start
+fi
+
+# Start system-wide PulseAudio daemon (not recommended, nor required in
+# order to use PulseAudio -- see the script for details):
+if [ -x /etc/rc.d/rc.pulseaudio ]; then
+  /etc/rc.d/rc.pulseaudio start
+fi
+
+# These GTK+/pango files need to be kept up to date for
+# proper input method, pixbuf loaders, and font support.
+if [ -x /usr/bin/update-gtk-immodules ]; then
+  echo "Updating gtk.immodules:"
+  echo "  /usr/bin/update-gtk-immodules &"
+  /usr/bin/update-gtk-immodules > /dev/null 2>&1 &
+fi
+if [ -x /usr/bin/update-gdk-pixbuf-loaders ]; then
+  echo "Updating gdk-pixbuf.loaders:"
+  echo "  /usr/bin/update-gdk-pixbuf-loaders &"
+  HOME=/root /usr/bin/update-gdk-pixbuf-loaders > /dev/null 2>&1 &
+fi
+if [ -x /usr/bin/update-pango-querymodules ]; then
+  echo "Updating pango.modules:"
+  echo "  /usr/bin/update-pango-querymodules &"
+  /usr/bin/update-pango-querymodules > /dev/null 2>&1 &
+fi
+if [ -x /usr/bin/glib-compile-schemas ]; then
+  echo "Compiling GSettings XML schema files:"
+  echo "  /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas &"
+  /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas >/dev/null 2>&1 &
+fi
+
+# Start dnsmasq, a simple DHCP/DNS server:
+if [ -x /etc/rc.d/rc.dnsmasq ]; then
+  /etc/rc.d/rc.dnsmasq start
+fi
+
+# Start snmpd:
+if [ -x /etc/rc.d/rc.snmpd ]; then
+  /etc/rc.d/rc.snmpd start
+fi
+
+# Start the print spooling system.  This will usually be LPRng (lpd) or CUPS.
+if [ -x /etc/rc.d/rc.cups ]; then
+  # Start CUPS:
+  /etc/rc.d/rc.cups start
+elif [ -x /etc/rc.d/rc.lprng ]; then
+  # Start LPRng (lpd):
+  /etc/rc.d/rc.lprng start
+fi
+
+# Start netatalk. (a file/print server for Macs using Appletalk)
+if [ -x /etc/rc.d/rc.atalk ]; then
+  /etc/rc.d/rc.atalk start
+fi
+
+# Start smartd, which monitors the status of S.M.A.R.T. compatible
+# hard drives and reports any problems:
+if [ -x /etc/rc.d/rc.smartd ]; then
+  /etc/rc.d/rc.smartd start
+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-*/ 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
+# accounting is not enabled (since /var/log/pacct does not exist).  This is
+# because the log file can get VERY large.
+if [ -x /sbin/accton -a -r /var/log/pacct ]; then
+  chmod 640 /var/log/pacct
+  /sbin/accton /var/log/pacct
+fi
+
+# Start crond (Dillon's crond):
+if [ -x /etc/rc.d/rc.crond ]; then
+  /etc/rc.d/rc.crond start
+fi
+
+# Start atd (manages jobs scheduled with 'at'):
+if [ -x /etc/rc.d/rc.atd ]; then
+  /etc/rc.d/rc.atd start
+fi
+
+## Mini-Quota-HOWTO:
+# To really activate quotas, you'll need to add 'usrquota' and/or 'grpquota' to
+# the appropriate partitions as listed in /etc/fstab.  Here's an example:
+#
+# /dev/hda2      /home      ext3     defaults,usrquota      1   1
+#
+# You'll then need to setup initial quota files at the top of the partitions
+# to support quota, like this:
+# touch /home/aquota.user /home/aquota.group
+# chmod 600 /home/aquota.user /home/aquota.group
+#
+# Then, reboot to activate the system.
+# To edit user quotas, use 'edquota'.  See 'man edquota'.  Also, the
+# official Quota Mini-HOWTO has lots of useful information.  That can be found
+# here:  /usr/doc/Linux-HOWTOs/Quota
+
+# Check quotas and then turn quota system on:
+if grep -q quota /etc/fstab ; then
+  for quotafs in $(awk '/quota/ {print $2}' /etc/fstab) ; do
+    /bin/rm -f $quotafs/{a,}quota.{group,user}.new
+  done
+  if [ -x /sbin/quotacheck ]; then
+    echo "Checking filesystem quotas:  /sbin/quotacheck -avugm"
+    /sbin/quotacheck -avugm
+  fi
+  if [ -x /sbin/quotaon ]; then
+    echo "Activating filesystem quotas:  /sbin/quotaon -avug"
+    /sbin/quotaon -avug
+  fi
+fi
+
+# Start the SASL authentication server.  This provides SASL
+# authentication services for sendmail:
+if [ -x /etc/rc.d/rc.saslauthd ]; then
+  /etc/rc.d/rc.saslauthd start
+fi
+
+# Start the IMAP daemon:
+if [ -x /etc/rc.d/rc.cyrus-imapd ]; then
+  /etc/rc.d/rc.cyrus-imapd start
+fi
+
+# Start the mail server:
+if [ -x /etc/rc.d/rc.sendmail -a -x usr/sbin/makemap ]; then
+  /etc/rc.d/rc.sendmail start
+elif [ -x /etc/rc.d/rc.postfix -a -x usr/sbin/postdrop ]; then
+  /etc/rc.d/rc.postfix start
+fi
+
+# Start the Memcached daemon:
+if [ -x /etc/rc.d/rc.memcached ]; then
+  /etc/rc.d/rc.memcached start
+fi
+
+# Start the Tomcat daemon:
+if [ -x /etc/rc.d/rc.tomcat ]; then
+  /etc/rc.d/rc.tomcat 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
+fi
+
+# Load a custom keymap if the user has an rc.keymap script.
+if [ -x /etc/rc.d/rc.keymap ]; then
+  /etc/rc.d/rc.keymap
+fi
+
+
+# Start the MySQL database:
+if [ -x /etc/rc.d/rc.mysqld ]; then
+  /etc/rc.d/rc.mysqld start
+fi
+
+# Startup postgresql:
+if [ -x /etc/rc.d/rc.postgresql ]; then
+  /etc/rc.d/rc.postgresql start
+fi
+
+# Start FastCGI PHP server:
+if [ -x /etc/rc.d/rc.php-fpm ]; then
+  /etc/rc.d/rc.php-fpm start
+fi
+
+# Start uWSGI for cGit server:
+if [ -x /etc/rc.d/rc.cgit-uwsgi ]; then
+  /etc/rc.d/rc.cgit-uwsgi start
+fi
+
+# Start key-value store Redis:
+if [ -x /etc/rc.d/rc.redis ]; then
+  /etc/rc.d/rc.redis start
+fi
+
+# Start Message broker RabbitMQ:
+if [ -x /etc/rc.d/rc.rabbitmq ]; then
+  /etc/rc.d/rc.rabbitmq start
+fi
+
+# Start Nginx server:
+if [ -x /etc/rc.d/rc.nginx ]; then
+  /etc/rc.d/rc.nginx start
+fi
+
+# Start Apache web server:
+if [ -x /etc/rc.d/rc.httpd ]; then
+  /etc/rc.d/rc.httpd start
+fi
+
+# Start OpenLDAP:
+if [ -x /etc/rc.d/rc.openldap ]; then
+  /etc/rc.d/rc.openldap start
+fi
+
+# Start local LDAP name service daemon (from nss-pam-ldapd):
+if [ -x /etc/rc.d/rc.nslcd ]; then
+  /etc/rc.d/rc.nslcd start
+fi
+
+# Start Dovecot:
+if [ -x /etc/rc.d/rc.dovecot ]; then
+  /etc/rc.d/rc.dovecot start
+fi
+
+# Start Samba (a file/print server for Win95/NT machines).
+# Samba can be started in /etc/inetd.conf instead.
+if [ -x /etc/rc.d/rc.samba ]; then
+  /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
+
+# Start the Icecream scheduler. This needs to run on
+# only one machine that is part of the compile cluster:
+if [ -x /etc/rc.d/rc.icecc-scheduler ]; then
+  /etc/rc.d/rc.icecc-scheduler start
+fi
+
+# Start the Icecream daemon. This needs to run on every machine that will be
+# part of the compile cluster (including the machine running the scheduler):
+if [ -x /etc/rc.d/rc.iceccd ]; then
+  /etc/rc.d/rc.iceccd 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
+fi
+
+# Start the local setup procedure.
+if [ -x /etc/rc.d/rc.local ]; then
+  /etc/rc.d/rc.local
+fi
+
+# All done.
Index: rc.S.in
===================================================================
--- rc.S.in	(nonexistent)
+++ rc.S.in	(revision 5)
@@ -0,0 +1,475 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.S:  System initialization script.
+#
+# Written by:      Patrick J. Volkerding, <volkerdi@slackware.com>
+# Modified by:     Andrey V. Kosteltsev,  <kx@radix.pro>
+#
+
+PATH=/sbin:/usr/local/sbin:/bin:/usr/local/bin:/usr/sbin:/usr/bin
+
+# Mount /proc if it is not already mounted:
+if [ ! -d /proc/sys ]; then
+  /sbin/mount -v proc /proc -n -t proc 2> /dev/null
+fi
+
+# Mount /sys if it is not already mounted:
+if [ ! -d /sys/kernel ]; then
+  /sbin/mount -v sysfs /sys -n -t sysfs 2> /dev/null
+fi
+
+# If /run exists, mount a tmpfs on it (unless the initrd has already done so):
+if [ -d /run ]; then
+  if ! grep -wq "tmpfs /run tmpfs" /proc/mounts ; then
+    /sbin/mount -v -n -t tmpfs tmpfs /run -o mode=0755,size=32M,nodev,nosuid,noexec
+  fi
+fi
+
+# Load the loop device kernel module (not applicable on OMAP5):
+if [ -x /etc/rc.d/rc.loop ]; then
+  /etc/rc.d/rc.loop start
+fi
+
+
+# Initialize udev to manage /dev entries and hotplugging for 3.x kernels.
+# You may turn off udev by making the /etc/rc.d/rc.udev file non-executable
+# or giving the "nohotplug" option at boot, but realize that if you turn off
+# udev that you will have to load all the kernel modules that you need
+# yourself (possibly in /etc/rc.d/rc.modules, which does not promise to list
+# all of them), and make any additional device nodes that you need in the
+# /dev directory.  Even USB and IEEE1394 devices will need to have the
+# modules loaded by hand if udev is not used.  So use it.  :-)
+if grep -wq sysfs /proc/mounts && grep -q devtmpfs /proc/filesystems ; then
+  if ! grep -wq nohotplug /proc/cmdline ; then
+    if [ -x /etc/rc.d/rc.udev ]; then
+      /etc/rc.d/rc.udev start
+    fi
+  fi
+fi
+
+# Mount Control Groups filesystem interface:
+if grep -wq cgroup /proc/filesystems ; then
+  if [ -d /sys/fs/cgroup ]; then
+    # See linux-*/Documentation/cgroups/cgroups.txt (section 1.6)
+    # Check if we have some tools to autodetect the available cgroup controllers
+    if [ -x /bin/cut -a -x /bin/tail ]; then
+      # Mount a tmpfs as the cgroup filesystem root
+      mount -t tmpfs -o mode=0755,size=8M cgroup_root /sys/fs/cgroup
+      # Autodetect available controllers and mount them in subfolders
+      controllers="$(/bin/cut -f 1 /proc/cgroups | /bin/tail -n +2)"
+      for i in $controllers; do
+        mkdir /sys/fs/cgroup/$i
+        mount -t cgroup -o $i $i /sys/fs/cgroup/$i
+      done
+      unset i controllers
+    else
+      # We can't use autodetection so fall back mounting them all together
+      mount -t cgroup cgroup /sys/fs/cgroup
+    fi
+  else
+    mkdir -p /dev/cgroup
+    mount -t cgroup cgroup /dev/cgroup
+  fi
+fi
+
+# Initialize the Logical Volume Manager.
+# This won't start unless we find /etc/lvmtab (LVM1) or
+# /etc/lvm/backup/ (LVM2).  This is created by /sbin/vgscan, so to
+# use LVM you must run /sbin/vgscan yourself the first time (and
+# create some VGs and LVs).
+# Create LVM lock/run directories:
+mkdir -p -m 0700 /run/lvm /run/lock /run/lock/lvm
+if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then
+  echo "Initializing LVM (Logical Volume Manager):"
+  # Check for device-mapper support.
+  if ! grep -wq device-mapper /proc/devices ; then
+    # Try to load a device-mapper kernel module:
+    /sbin/modprobe -q dm-mod
+  fi
+  # Scan for new volume groups:
+  /sbin/vgscan --mknodes --ignorelockingfailure 2> /dev/null
+  if [ $? = 0 ]; then
+    # Make volume groups available to the kernel.
+    # This should also make logical volumes available.
+    /sbin/vgchange -ay --ignorelockingfailure
+  fi
+fi
+
+# Open any volumes created by cryptsetup:
+#
+# Some notes on /etc/crypttab in Slackware:
+# Only LUKS formatted volumes are supported (except for swap)
+# crypttab follows the following format:
+# <luks_name> <device> <password> <options>
+#
+# <luks_name>:  This is the name of your LUKS volume.
+# For example:  crypt-home
+#
+# <device>:  This is the device containing your LUKS volume.
+# For example:  /dev/sda2
+#
+# <password>:  This is either the volume password in plain text, or the name of
+# a key file.  Use 'none' to interactively enter password on boot.
+#
+# <options>:  Comma-separated list of options.  Note that there must be a
+# password field for any options to be picked up (use a password of 'none' to
+# get a password prompt at boot).  The following options are supported:
+#
+# discard -- this will cause --allow-discards to be passed to the cryptsetup
+# program while opening the LUKS volume.
+#
+# ro -- this will cause --readonly to be passed to the cryptsetup program while
+# opening the LUKS volume.
+#
+# swap -- this option cannot be used with other options.  The device given will
+# be formatted as a new encrypted volume with a random key on boot, and used as
+# swap.
+#
+if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then
+  # First, check for device-mapper support.
+  if ! grep -wq device-mapper /proc/devices ; then
+    # If device-mapper exists as a module, try to load it.
+    # Try to load a device-mapper kernel module:
+    /sbin/modprobe -q dm-mod
+  fi
+  # NOTE: we only support LUKS formatted volumes (except for swap)!
+  cat /etc/crypttab | grep -v "^#" | grep -v "^$" | while read line; do
+    eval LUKSARRAY=( $line )
+    LUKS="${LUKSARRAY[0]}"
+    DEV="${LUKSARRAY[1]}"
+    PASS="${LUKSARRAY[2]}"
+    OPTS="${LUKSARRAY[3]}"
+    LUKSOPTS=""
+    if echo $OPTS | grep -wq ro ; then LUKSOPTS="${LUKSOPTS} --readonly" ; fi
+    if echo $OPTS | grep -wq discard ; then LUKSOPTS="${LUKSOPTS} --allow-discards" ; fi
+    # Skip LUKS volumes that were already unlocked (in the initrd):
+    /sbin/cryptsetup status $LUKS 2>/dev/null | head -n 1 | grep -q "is active" && continue
+    if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then
+      if [ -z "${LUKSOPTS}" ]; then
+        echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV':"
+      else
+        echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV' with options '${LUKSOPTS}':"
+      fi
+      if [ -n "${PASS}" -a "${PASS}" != "none" ]; then
+        if [ -f "${PASS}" ]; then
+          # A password was given a key-file filename
+          /sbin/cryptsetup ${LUKSOPTS} --key-file=${PASS} luksOpen $DEV $LUKS
+        else
+          # A password was provided in plain text
+          echo "${PASS}" | /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS
+        fi
+      else
+        # No password was given, or a password of 'none' was given
+        /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS </dev/tty0 >/dev/tty0 2>&1
+      fi
+    elif echo $OPTS | grep -wq swap ; then
+      # If any of the volumes is to be used as encrypted swap,
+      # then encrypt it using a random key and run mkswap:
+      echo "Creating encrypted swap volume '${LUKS}' on device '$DEV':"
+      /sbin/cryptsetup --cipher=aes --key-file=/dev/urandom --key-size=256 create $LUKS $DEV
+      mkswap /dev/mapper/$LUKS
+    fi
+  done
+fi
+
+# Enable swapping:
+/sbin/swapon -a 2> /dev/null
+
+## Start FUSE, if requested:
+#if [ -x /etc/rc.d/rc.fuse ]; then
+#  /etc/rc.d/rc.fuse start
+#fi
+
+# Set the tick and frequency for the system clock.
+# Default values are: TICK=10000 and FREQ=0
+TICK=10000
+FREQ=0
+# If there's a /etc/default/adjtimex config file, source it to override
+# the default TICK and FREQ:
+if [ -r /etc/default/adjtimex ]; then
+  . /etc/default/adjtimex
+fi
+if /sbin/adjtimex --tick $TICK --frequency $FREQ; then
+  echo "Setting the system clock rate:  /sbin/adjtimex --tick $TICK --frequency $FREQ"
+else
+  echo "Failed to set system clock with adjtimex, possibly invalid parameters? (TICK=$TICK FREQ=$FREQ)"
+fi
+
+# Set the system time from the hardware clock using hwclock --hctosys.
+if [ -x /sbin/hwclock ]; then
+  # Check for a broken motherboard RTC clock (where ioports for rtc are
+  # unknown) to prevent hwclock causing a hang:
+  if ! grep -q " : rtc" /proc/ioports ; then
+    CLOCK_OPT="--directisa"
+  fi
+  if [ /etc/adjtime -nt /etc/hardwareclock ]; then
+    if grep -q "^LOCAL" /etc/adjtime ; then
+      echo -n "Setting system time from the hardware clock (localtime):  "
+    else
+      echo -n "Setting system time from the hardware clock (UTC):  "
+    fi
+    /sbin/hwclock $CLOCK_OPT --hctosys
+  elif grep -wq "^localtime" /etc/hardwareclock 2> /dev/null ; then
+    echo -n "Setting system time from the hardware clock (localtime):  "
+    /sbin/hwclock $CLOCK_OPT --localtime --hctosys
+  else
+    echo -n "Setting system time from the hardware clock (UTC):  "
+    /sbin/hwclock $CLOCK_OPT --utc --hctosys
+  fi
+  date
+fi
+
+#######
+####### TODO: Test to see if the root partition is read-only, like it ought to be.
+#######
+
+## Test to see if the root partition is read-only, like it ought to be.
+#READWRITE=no
+#if touch /fsrwtestfile 2>/dev/null; then
+#  rm -f /fsrwtestfile
+#  READWRITE=yes
+#else
+#  echo "Testing root filesystem status:  read-only filesystem"
+#fi
+#
+## See if a forced filesystem check was requested at shutdown:
+#if [ -r /etc/forcefsck ]; then
+#  FORCEFSCK="-f"
+#fi
+#
+## If we're using F2FS for the root filesystem, don't check it as it doesn't
+## allow checking a read-only filesystem:
+#if grep -q ' / f2fs ' /proc/mounts ; then
+#  echo "Remounting root device with read-write enabled."
+#  /sbin/mount -w -v -n -o remount /
+#elif [ ! $READWRITE = yes ]; then
+#  # Check the root filesystem:
+#  RETVAL=0
+#  if [ ! -r /etc/fastboot ]; then
+#    echo "Checking root filesystem:"
+#    /sbin/fsck $FORCEFSCK -C -a /
+#    RETVAL=$?
+#  fi
+#  # An error code of 2 or higher will require a reboot.
+#  if [ $RETVAL -ge 2 ]; then
+#    # An error code equal to or greater than 4 means that some errors
+#    # could not be corrected.  This requires manual attention, so we
+#    # offer a chance to try to fix the problem in single-user mode:
+#    if [ $RETVAL -ge 4 ]; then
+#      echo
+#      echo "***********************************************************"
+#      echo "*** An error occurred during the root filesystem check. ***"
+#      echo "*** You will now be given a chance to log into the      ***"
+#      echo "*** system in single-user mode to fix the problem.      ***"
+#      echo "***                                                     ***"
+#      echo "*** If you are using the ext2 filesystem, running       ***"
+#      echo "*** 'e2fsck -v -y <partition>' might help.              ***"
+#      echo "***********************************************************"
+#      echo
+#      echo "Once you exit the single-user shell, the system will reboot."
+#      echo
+#      PS1="(Repair filesystem) \#"; export PS1
+#      sulogin
+#    else # With an error code of 2 or 3, reboot the machine automatically:
+#      echo
+#      echo "***********************************"
+#      echo "*** The filesystem was changed. ***"
+#      echo "*** The system will now reboot. ***"
+#      echo "***********************************"
+#      echo
+#    fi
+#    echo "Unmounting file systems."
+#    /sbin/umount -a -r
+#    /sbin/mount -n -o remount,ro /
+#    echo "Rebooting system."
+#    reboot -f
+#  fi
+#  # Remount the root filesystem in read-write mode
+#  echo "Remounting root device with read-write enabled:"
+#  /sbin/mount -w -v -n -o remount /
+#  if [ $? -gt 0 ] ; then
+#    echo "FATAL:  Attempt to remount root device as read-write failed!  This is going to"
+#    echo "cause serious problems."
+#  fi
+#else
+#  echo "Testing root filesystem status:  read-write filesystem"
+#  echo
+#  echo "ERROR: Root partition has already been mounted read-write. Cannot check!"
+#  echo
+#  echo "For filesystem checking to work properly, your system must initially mount"
+#  echo "the root partition as read only.  If you're booting with LILO, add a line:"
+#  echo
+#  echo "   read-only"
+#  echo
+#  echo "to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it."
+#fi # Done checking root filesystem
+
+
+  echo "Remounting root device with read-write enabled:"
+  /sbin/mount -w -v -n -o remount /
+#######
+#######
+#######
+
+
+# If /etc/mtab is a symlink (probably to /proc/mounts) then we don't want to mess with it.
+if [ ! -L /etc/mtab -o ! -r /etc/mtab ]; then
+  # /etc/mtab is a file (or doesn't exist), so we'll handle it the old way:
+  # Any /etc/mtab that exists here is old, so we start with a new one:
+  /bin/rm -f /etc/mtab{,~,.tmp} && /bin/touch /etc/mtab
+  # Add /, /proc, /sys, and /dev/shm mounts to /etc/mtab:
+  /sbin/mount -f -w /
+  if [ -d /proc/sys ]; then
+    /sbin/mount -f -t proc proc /proc
+  fi
+  if [ -d /sys/bus ]; then
+    /sbin/mount -f -t sysfs sysfs /sys
+  fi
+  if grep -q '^[^ ]\+ /dev/shm ' /proc/mounts 2> /dev/null ; then
+    /sbin/mount -f -t tmpfs tmpfs /dev/shm
+  fi
+fi
+
+# Configure ISA Plug-and-Play devices:
+if [ -r /etc/isapnp.conf ]; then
+  if [ -x /sbin/isapnp ]; then
+    /sbin/isapnp /etc/isapnp.conf
+  fi
+fi
+
+
+# Run the kernel module script.  This updates the module dependencies and
+# also supports manually loading kernel modules through rc.modules.local.
+if [ -x /etc/rc.d/rc.modules ]; then
+  /etc/rc.d/rc.modules
+fi
+
+# Configure kernel parameters:
+if [ -x /sbin/sysctl -a -r /etc/sysctl.conf ]; then
+  echo "Configuring kernel parameters:  /sbin/sysctl -e --system"
+  /sbin/sysctl -e --system
+elif [ -x /sbin/sysctl  ]; then
+  echo "Configuring kernel parameters:  /sbin/sysctl -e --system"
+  # Don't say "Applying /etc/sysctl.conf" or complain if the file doesn't exist
+  /sbin/sysctl -e --system 2> /dev/null | grep -v "Applying /etc/sysctl.conf"
+fi
+
+# Check all the non-root filesystems:
+if [ ! -r /etc/fastboot ]; then
+  echo "Checking non-root filesystems:"
+  /sbin/fsck $FORCEFSCK -C -R -A -a
+fi
+
+# Mount usbfs only if it is found in /etc/fstab:
+if grep -wq usbfs /proc/filesystems; then
+  if ! grep -wq usbfs /proc/mounts ; then
+    if grep -wq usbfs /etc/fstab; then
+      /sbin/mount -v /proc/bus/usb
+    fi
+  fi
+fi
+
+# Mount non-root file systems in fstab, but not NFS or SMB 
+# because TCP/IP is not yet configured, and not proc or sysfs
+# because those have already been mounted.  Also check that
+# devpts is not already mounted before attempting to mount
+# it.  With a 2.6.x or newer kernel udev mounts devpts.
+echo "Mounting non-root local filesystems:"
+if /bin/grep -wq devpts /proc/mounts ; then
+  # This pipe after the mount command is just to convert the new
+  # mount verbose output back to the old format that contained
+  # more useful information:
+  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs,nodevpts | grep successfully | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep " ${dev} " ; done
+else
+  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs | grep successfully | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep " ${dev} " ; done
+fi
+
+# Make sure that /var/run is a symbolic link pointing to /run:
+if [ -d /run -a ! -L /var/run ]; then
+  (cd /var ; rm -rf run ; ln -sf /run run)
+fi
+
+# Enable swapping again.  This is needed in case a swapfile is used,
+# as it can't be enabled until the filesystem it resides on has been
+# mounted read-write.
+/sbin/swapon -a 2> /dev/null
+
+# Start libcgroup services:
+if [ -x /etc/rc.d/rc.cgconfig -a -x /etc/rc.d/rc.cgred -a -d /sys/fs/cgroup ]; then
+  /etc/rc.d/rc.cgconfig start ; echo " /usr/sbin/cgconfigparser -l /etc/cgconfig.conf"
+  /etc/rc.d/rc.cgred start
+fi
+
+# Clean up some temporary files:
+rm -f /etc/nologin /etc/dhcpc/*.pid /etc/forcefsck /etc/fastboot \
+  /var/state/saslauthd/saslauthd.pid /tmp/.Xauth* 1> /dev/null 2> /dev/null
+rm -rf /tmp/{kde-[a-zA-Z]*,ksocket-[a-zA-Z]*,hsperfdata_[a-zA-Z]*,plugtmp*}
+if [ -d /var/lib/@DISTRO@/setup/tmp ]; then
+  ( cd /var/lib/@DISTRO@/setup/tmp && rm -rf * )
+fi
+
+# Clear /var/lock/subsys:
+if [ -d /var/lock/subsys ]; then
+  rm -f /var/lock/subsys/*
+fi
+
+# Create /tmp/{.ICE-unix,.X11-unix} if they are not present:
+if [ ! -e /tmp/.ICE-unix ]; then
+  mkdir -p /tmp/.ICE-unix
+  chmod 1777 /tmp/.ICE-unix
+fi
+if [ ! -e /tmp/.X11-unix ]; then
+  mkdir -p /tmp/.X11-unix
+  chmod 1777 /tmp/.X11-unix
+fi
+
+# Create a fresh utmp file:
+touch /var/run/utmp
+chown root:utmp /var/run/utmp
+chmod 664 /var/run/utmp
+
+# In case pam_faillock(8) is being used, create the tally directory:
+mkdir -p /var/run/faillock
+
+# Update the current kernel level in the /etc/motd (Message Of The Day) file,
+# if the first line of that file begins with the word 'Linux'.
+# You are free to modify the rest of the file as you see fit.
+if [ -x /bin/sed ]; then
+  /bin/sed -i "{1s/^Linux.*/$(/bin/uname -sr)\./}" /etc/motd
+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
+fi
+
+# Run serial port setup script:
+# CAREFUL!  This can make some systems hang if the rc.serial script isn't
+# set up correctly.  If this happens, you may have to edit the file from
+# a boot disk, and/or set it as non-executable:
+if [ -x /etc/rc.d/rc.serial ]; then
+  /etc/rc.d/rc.serial start
+fi
+
+# Start the framebuffer setup procedure.
+if [ -x /etc/rc.d/rc.fbset ]; then
+  /etc/rc.d/rc.fbset
+fi
+
+# Start the remote control setup procedure.
+if [ -x /etc/rc.d/rc.remote-control ]; then
+  /etc/rc.d/rc.remote-control
+fi
+
+# Carry an entropy pool between reboots to improve randomness.
+if [ -f /etc/random-seed ]; then
+  echo "Using /etc/random-seed to initialize /dev/urandom."
+  cat /etc/random-seed > /dev/urandom
+fi
+# Use the pool size from /proc, or 4096 bits:
+if [ -r /proc/sys/kernel/random/poolsize ]; then
+  dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(expr $(cat /proc/sys/kernel/random/poolsize) / 8) 2> /dev/null
+else
+  dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
+fi
+chmod 600 /etc/random-seed
Index: rc.fbset
===================================================================
--- rc.fbset	(nonexistent)
+++ rc.fbset	(revision 5)
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# This setup default framebuffer mode.
+#
+# fbset(8)
+
Index: rc.font
===================================================================
--- rc.font	(nonexistent)
+++ rc.font	(revision 5)
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# This selects your default screen font from among the ones in
+# /usr/share/consolefonts or /usr/share/kbd/consolefonts.
+#
+
+#
+# Examples:
+# --------
+#
+# setfont -v
+#
+# setfont -v LatArCyrHeb-16.psfu.gz -m 8859-5
+# loadkeys ru-rCtrl-iso88595
+#
+# unicode_start LatArCyrHeb-16
+# loadkeys ru-rCtrl-utf8
+#
+
+FONT=/usr/share/kbd/consolefonts/ter-c16b.psf.gz
+if [ ! -f "${FONT}" ] ; then
+  FONT=/usr/share/kbd/consolefonts/LatArCyrHeb-16.psfu.gz
+fi
+
+KEYMAP=ru-rCtrl-utf8
+
+#
+# setfont & loadkeys for each console present in inittab:
+#
+for TTY in `grep '^[^#].*respawn:/sbin/agetty' /etc/inittab | grep -o '\btty[[:digit:]]*\b'` ; do
+  openvt -f -w -c ${TTY#tty} -- \
+    /bin/sh -c "setfont -v -C /dev/tty${TTY#tty} ${FONT} -m 8859-5 &>/dev/null"
+  openvt -f -w -c ${TTY#tty} -- \
+    /bin/sh -c "loadkeys ${KEYMAP} &>/dev/null"
+done
Index: rc.gpm
===================================================================
--- rc.gpm	(nonexistent)
+++ rc.gpm	(revision 5)
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Start/stop/restart the GPM mouse server:
+#
+
+if [ "$1" = "stop" ]; then
+  echo "Stopping gpm..."
+  /usr/sbin/gpm -k
+elif [ "$1" = "restart" ]; then
+  echo "Restarting gpm..."
+  /usr/sbin/gpm -k
+  sleep 1
+  /usr/sbin/gpm -m /dev/mouse -t imps2
+else # assume $1 = start:
+  echo "Starting gpm:  /usr/sbin/gpm -m /dev/mouse -t imps2"
+  /usr/sbin/gpm -m /dev/mouse -t imps2
+fi
+
+# There is another way to run GPM, where it acts as a repeater outputting a
+# virtual MouseSystems mouse on /dev/gpmdata.  This is useful for feeding
+# gpm's data to X, especially if you've got a busmouse (in that situation X
+# and gpm may not coexist without using a repeater).  To try running a GPM
+# repeater for X, change the gpm command line to look like this:
+# /usr/sbin/gpm -R msc -m /dev/mouse -t imps2
+# Then, make sure that the mouse configuration in your XF86Config file refers
+# to the repeater device (/dev/gpmdata) and a MouseSystems mouse type.  If you
+# edit the file directly, you'll want the lines to look like this (minus the
+# comment marks '#' shown here, of course):
+#Section "Pointer"
+#    Protocol    "MouseSystems"
+#    Device      "/dev/gpmdata"
Index: rc.inet1
===================================================================
--- rc.inet1	(nonexistent)
+++ rc.inet1	(revision 5)
@@ -0,0 +1,703 @@
+#!/bin/bash
+# /etc/rc.d/rc.inet1
+# This script is used to bring up the various network interfaces.
+#
+# @(#)/etc/rc.d/rc.inet1 10.2  Sun Jul 24 12:45:56 PDT 2005  (pjv)
+
+############################
+# READ NETWORK CONFIG FILE #
+############################
+
+# Get the configuration information from /etc/rc.d/rc.inet1.conf:
+. /etc/rc.d/rc.inet1.conf
+
+###########
+# LOGGING #
+###########
+
+# Message logging.
+info_log() {
+  # If possible, log events in /var/log/messages:
+  if [ -f /var/run/syslogd.pid ] && [ -x /usr/bin/logger ]; then
+    /usr/bin/logger -t "rc.inet1" --id="$$" "$*"
+  else
+    printf "%s: %s\\n" "rc.inet1" "$*"
+  fi
+}
+
+# Verbose logging.
+debug_log() {
+  if [ "$DEBUG_ETH_UP" = "yes" ]; then
+    info_log "$*"
+  fi
+}
+
+############################
+# DETERMINE INTERFACE LIST #
+############################
+
+# Compose a list of interfaces from /etc/rc.d/rc.inet1.conf (with a maximum
+# of 6 interfaces, but you can easily enlarge the interface limit
+# - send me a picture of such a box :-).
+# If a value for IFNAME[n] is not set, we assume it is an eth'n' interface.
+# This way, the new script is compatible with older rc.inet1.conf files.
+# The IFNAME array will be used to determine which interfaces to bring up/down.
+MAXNICS=${MAXNICS:-6}
+i=0
+while [ $i -lt $MAXNICS ];
+do
+  IFNAME[$i]=${IFNAME[$i]:=eth${i}}
+  i=$((i+1))
+done
+debug_log "List of interfaces: ${IFNAME[*]}"
+
+####################
+# PRE-LOAD MODULES #
+####################
+
+for i in "${IFNAME[@]}"; do
+  # If the interface isn't in the kernel yet (but there's an alias for it in modules.conf),
+  # then it should be loaded first:
+  if [ ! -e /sys/class/net/${i%%[:.]*} ]; then # no interface yet
+    if /sbin/modprobe -c | grep -v "^#" | grep -w "alias ${i%%[:.]*}" | grep -vw "alias ${i%%[:.]*} off" >/dev/null; then
+      debug_log "/sbin/modprobe ${i%%[:.]*}"
+      /sbin/modprobe ${i%%[:.]*}
+      _DID_MODPROBE=1
+    fi
+  fi
+done
+# Normally the ipv6 module would be automatically loaded when the first IP is assigned to an
+# interface (assuming ipv6 has not been disabled entirely), but autoconf/accept_ra need to be
+# set to 0 before that happens, so try to pre-load ipv6 here.
+if [ ! -e /proc/sys/net/ipv6 ]; then
+  debug_log "/sbin/modprobe ipv6"
+  /sbin/modprobe -q ipv6
+  _DID_MODPROBE=1
+fi
+# If we did any module loading in the blocks above, sleep for a couple of
+# seconds to give time for everything to "take"
+[ -n "${_DID_MODPROBE}" ] && sleep 2
+unset _DID_MODPROBE
+
+######################
+# LOOPBACK FUNCTIONS #
+######################
+
+# Function to bring up the loopback interface.  If loopback is
+# already up, do nothing.
+lo_up() {
+  if [ -e /sys/class/net/lo ]; then
+    if ! /sbin/ip link show dev lo | grep -wq -e "state UP" -e "state UNKNOWN" ; then
+      info_log "lo: configuring interface"
+      debug_log "/sbin/ip -4 address add 127.0.0.1/8 dev lo"
+      /sbin/ip -4 address add 127.0.0.1/8 dev lo
+      if [ -e /proc/sys/net/ipv6 ]; then
+        debug_log "/sbin/ip -6 address add ::1/128 dev lo"
+        /sbin/ip -6 address add ::1/128 dev lo
+      fi
+      debug_log "/sbin/ip link set dev lo up"
+      /sbin/ip link set dev lo up
+      debug_log "/sbin/ip route add 127.0.0.0/8 dev lo"
+      /sbin/ip route add 127.0.0.0/8 dev lo
+    fi
+  fi
+}
+
+# Function to take down the loopback interface:
+lo_down() {
+  if [ -e /sys/class/net/lo ]; then
+    info_log "lo: de-configuring interface"
+    debug_log "/sbin/ip address flush dev lo"
+    /sbin/ip address flush dev lo
+    debug_log "/sbin/ip link set dev lo down"
+    /sbin/ip link set dev lo down
+  fi
+}
+
+#######################
+# INTERFACE FUNCTIONS #
+#######################
+
+# Function to create virtual interfaces
+virtif_create() {
+  # argument is 'i' - the position of this interface in the VIRTIFNAME array.
+  # this loop goes from i=0 to i=number_of_configured_virtual_interfaces_minus_one
+  # which means it doesn't do anything if there are none.
+  for i in $(seq 0 $((${#VIRTIFNAME[@]} - 1))); do
+    info_log "${VIRTIFNAME[$i]}: creating virtual interface"
+    debug_log "/sbin/ip tuntap add dev ${VIRTIFNAME[$i]} mode ${VIRTIFTYPE[$i]} user ${VIRTIFUSER[$i]} group ${VIRTIFGROUP[$i]}"
+    /sbin/ip tuntap add dev ${VIRTIFNAME[$i]} mode ${VIRTIFTYPE[$i]} user ${VIRTIFUSER[$i]} group ${VIRTIFGROUP[$i]}
+  done
+}
+
+# Function to destroy virtual interfaces
+virtif_destroy() {
+  # argument is 'i' - the position of this interface in the VIRTIFNAME array.
+  for i in $(seq 0 $((${#VIRTIFNAME[@]} - 1))); do
+    info_log "${VIRTIFNAME[$i]}: destroying virtual interface"
+    debug_log "/sbin/ip tuntap del dev ${VIRTIFNAME[$i]} mode ${VIRTIFTYPE[$i]}"
+    /sbin/ip tuntap del dev ${VIRTIFNAME[$i]} mode ${VIRTIFTYPE[$i]}
+  done
+}
+
+# Function to assemble a bridge interface.
+br_open() {
+  # argument is 'i' - the position of this interface in the IFNAME array.
+  info_log "${IFNAME[$1]}: creating bridge"
+  debug_log "/sbin/ip link add name ${IFNAME[$1]} type bridge"
+  /sbin/ip link add name ${IFNAME[$1]} type bridge
+  for BRIF in ${BRNICS[$1]}; do
+    debug_log "/sbin/ip address flush dev $BRIF"
+    /sbin/ip address flush dev $BRIF
+    debug_log "/sbin/ip link set dev $BRIF master ${IFNAME[$1]}"
+    /sbin/ip link set dev $BRIF master ${IFNAME[$1]}
+    debug_log "/sbin/ip link set dev $BRIF up"
+    /sbin/ip link set dev $BRIF up
+  done
+  while read -r -d \| IFOPT; do
+    if [ -n "$IFOPT" ]; then
+      debug_log "/sbin/ip link set dev ${IFNAME[$1]} type bridge $IFOPT"
+      /sbin/ip link set dev ${IFNAME[$1]} type bridge $IFOPT
+    fi
+  done <<<"${IFOPTS[$1]/%|*([[:blank:]])}|"	# The | on the end is required.
+  # Don't bring up the interface if it will be brought up later during IP configuration.
+  # This prevents a situation where SLAAC takes a while to apply if the interface is already up.
+  if [ -z "${IPADDRS[$1]}" ] && [ -z "${IP6ADDRS[$1]}" ] && [ -z "${IPADDR[$1]}" ] && [ "${USE_DHCP[$1]}" != "yes" ] && [ "${USE_DHCP6[$1]}" != "yes" ] && [ "${USE_SLAAC[$1]}" != "yes" ]; then
+    debug_log "/sbin/ip link set dev ${IFNAME[$1]} up"
+    /sbin/ip link set dev ${IFNAME[$1]} up
+  fi
+}
+
+# Function to disassemble a bridge interface.
+br_close() {
+  # argument is 'i' - the position of this interface in the IFNAME array.
+  info_log "${IFNAME[$1]}: destroying bridge"
+  debug_log "/sbin/ip link set dev ${IFNAME[$1]} down"
+  /sbin/ip link set dev ${IFNAME[$1]} down
+  for BRIF in $(ls --indicator-style=none /sys/class/net/${IFNAME[$1]}/brif/)
+  do
+    debug_log "/sbin/ip link set dev $BRIF nomaster"
+    /sbin/ip link set dev $BRIF nomaster
+  done
+  for BRIF in ${BRNICS[$1]}; do
+    debug_log "/sbin/ip link set dev $BRIF down"
+    /sbin/ip link set dev $BRIF down
+  done
+  debug_log "/sbin/ip link del ${IFNAME[$1]}"
+  /sbin/ip link del ${IFNAME[$1]}
+}
+
+# Function to create a bond.
+bond_create() {
+  # Argument is 'i' - the position of this interface in the IFNAME array.
+  info_log "${IFNAME[$1]}: creating bond"
+  debug_log "/sbin/ip link add name ${IFNAME[$1]} type bond"
+  /sbin/ip link add name ${IFNAME[$1]} type bond
+  debug_log "/sbin/ip link set dev ${IFNAME[$1]} type bond mode ${BONDMODE[$1]:-balance-rr}"
+  /sbin/ip link set dev ${IFNAME[$1]} type bond mode ${BONDMODE[$1]:-balance-rr}
+  for BONDIF in ${BONDNICS[$1]}; do
+    debug_log "/sbin/ip address flush dev $BONDIF"
+    /sbin/ip address flush dev $BONDIF
+    debug_log "/sbin/ip link set $BONDIF master ${IFNAME[$1]}"
+    /sbin/ip link set $BONDIF master ${IFNAME[$1]}
+    debug_log "/sbin/ip link set dev $BONDIF up"
+    /sbin/ip link set dev $BONDIF up
+  done
+  # This has to be done *after* the interface is brought up because the
+  # 'primary <interface>' option has to occur after the interface is active.
+  while read -r -d \| IFOPT; do
+    if [ -n "$IFOPT" ]; then
+      debug_log "/sbin/ip link set dev ${IFNAME[$1]} type bond $IFOPT"
+      /sbin/ip link set dev ${IFNAME[$1]} type bond $IFOPT
+    fi
+  done <<<"${IFOPTS[$1]/%|*([[:blank:]])}|"	# The | on the end is required.
+}
+
+# Function to destroy a bond.
+bond_destroy() {
+  # Argument is 'i' - the position of this interface in the IFNAME array.
+  info_log "${IFNAME[$1]}: destroying bond"
+  debug_log "/sbin/ip link set dev ${IFNAME[$1]} down"
+  /sbin/ip link set dev ${IFNAME[$1]} down
+  debug_log "/sbin/ip address flush dev ${IFNAME[$1]}"
+  /sbin/ip address flush dev ${IFNAME[$1]}
+  for BONDIF in ${BONDNICS[$1]}; do
+    debug_log "/sbin/ip link set $BONDIF nomaster"
+    /sbin/ip link set $BONDIF nomaster
+    debug_log "/sbin/ip link set dev $BONDIF down"
+    /sbin/ip link set dev $BONDIF down
+  done
+  debug_log "/sbin/ip link del name ${IFNAME[$1]} type bond"
+  /sbin/ip link del name ${IFNAME[$1]} type bond
+}
+
+# Function to bring up a network interface.  If the interface is
+# already up or does not yet exist (perhaps because the kernel driver
+# is not loaded yet), do nothing.
+if_up() {
+  # Determine position 'i' of this interface in the IFNAME array:
+  i=0
+  while [ $i -lt $MAXNICS ]; do
+    [ "${IFNAME[$i]}" = "${1}" ] && break
+    i=$((i+1))
+  done
+  # If "i" is greater or equal to "MAXNICS" at this point, it means we didn't
+  # find an entry in IFNAME array corresponding to "${1}", which likely means
+  # there are more interfaces configured than MAXNICS. Let's err on the
+  # side of caution and do nothing instead of possibly doing the wrong thing.
+  if [ $i -ge $MAXNICS ]; then
+    info_log "${1}: skipping - you might need to increase MAXNICS"
+    return
+  fi
+  info_log "${1}: configuring interface"
+  # If you need to set hardware addresses for the underlying interfaces in a
+  # bond or bridge, configure the interfaces with IPs of 0.0.0.0 and set the
+  # MAC address with HWADDR.  Then, finally, define the bond or bridge.
+  # If the interface is a bond, create it.
+  [ -n "${BONDNICS[$i]}" ] && bond_create $i
+  # If the interface is a bridge, create it.
+  [ -n "${BRNICS[$i]}" ] && br_open $i
+  if [ -e /sys/class/net/${1%%[:.]*} ]; then # interface exists
+    if ! /sbin/ip address show scope global dev ${1} 2>/dev/null | grep -Ewq '(inet|inet6)' || \
+        ! /sbin/ip link show dev ${1} | grep -wq "state UP"; then # interface not up or not configured
+      local IF_UP=0
+      # Initialize any wireless parameters:
+      if [ -x /etc/rc.d/rc.wireless ]; then
+        . /etc/rc.d/rc.wireless ${1} start
+      fi
+      # Handle VLAN interfaces before trying to configure IP addresses.
+      if echo "${1}" | grep -Fq .; then
+        IFACE="${1%.*}"
+        VLAN="${1##*.}"
+        # Check if the underlying interface is already up.
+        if ! /sbin/ip link show dev $IFACE 2>/dev/null| grep -wq "state UP"; then
+          # Bring up the underlying interface.
+          debug_log "/sbin/ip link set dev $IFACE up"
+          if ! /sbin/ip link set dev $IFACE up; then
+            info_log "${1}: failed to bring up interface $IFACE"
+            return
+          fi
+          IF_UP=1
+        fi
+        # Configure the VLAN interface.
+        info_log "${1}: creating VLAN interface"
+        debug_log "/sbin/ip link add link $IFACE name ${1} type vlan id $VLAN"
+        if ! /sbin/ip link add link $IFACE name ${1} type vlan id $VLAN; then
+          info_log "${1}: failed to create VLAN interface"
+          ((IF_UP == 1)) && /sbin/ip link set dev $IFACE down
+          return
+        fi
+        while read -r -d \| IFOPT; do
+          if [ -n "$IFOPT" ]; then
+            debug_log "/sbin/ip link set dev ${1} type vlan $IFOPT"
+            /sbin/ip link set dev ${1} type vlan $IFOPT
+          fi
+        done <<<"${IFOPTS[$i]/%|*([[:blank:]])}|"	# The | on the end is required.
+      elif [ -z "${BONDNICS[$i]}" ] && [ -z "${BRNICS[$i]}" ]; then
+        # Only apply IFOPTS for a physical interface if it's not been handled
+        # by a higher level interface.
+        while read -r -d \| IFOPT; do
+          if [ -n "$IFOPT" ]; then
+            debug_log "/sbin/ip link set dev ${1} $IFOPT"
+            /sbin/ip link set dev ${1} $IFOPT
+          fi
+        done <<<"${IFOPTS[$i]/%|*([[:blank:]])}|"	# The | on the end is required.
+      fi
+      # Set hardware address:
+      if [ -n "${HWADDR[$i]}" ]; then
+        debug_log "/sbin/ip link set dev ${1} address ${HWADDR[$i]}"
+        if ! /sbin/ip link set dev ${1} address ${HWADDR[$i]} 2>/dev/null; then
+          info_log "${1}: failed to set hardware address"
+        fi
+      fi
+      if [ -e /proc/sys/net/ipv6 ]; then # ipv6 networking is available
+        # Disable v6 IP auto configuration before trying to bring up the interface:
+        debug_log "${1}: disabling IPv6 autoconf"
+        echo "0" >/proc/sys/net/ipv6/conf/${1}/autoconf
+        if [ "${USE_RA[$i]}" = "yes" ]; then
+          # Unconditionally accept router advertisements on this interface:
+          debug_log "${1}: accepting IPv6 RA"
+          echo "1" >/proc/sys/net/ipv6/conf/${1}/accept_ra
+        else
+          # Disable router advertisments on this interface until SLAAC is enabled:
+          debug_log "${1}: ignoring IPv6 RA"
+          echo "0" >/proc/sys/net/ipv6/conf/${1}/accept_ra
+        fi
+      fi
+      debug_log "/sbin/ip address flush dev ${1}"
+      /sbin/ip address flush dev ${1}
+      IF_UP=0
+      if [ -e /proc/sys/net/ipv6 ] && [ "${USE_DHCP6[$i]}" != "yes" ] && [ "${USE_SLAAC[$i]}" = "yes" ]; then # configure via SLAAC
+        info_log "${1}: enabling SLAAC"
+        # Enable accepting of RA packets, unless explicitly configured not to:
+        if [ "${USE_RA[$i]}" = "no" ]; then
+          debug_log "${1}: ignoring IPv6 RA"
+          echo "0" >/proc/sys/net/ipv6/conf/${1}/accept_ra
+        else
+          debug_log "${1}: accepting IPv6 RA"
+          echo "1" >/proc/sys/net/ipv6/conf/${1}/accept_ra
+        fi
+        # Set up SLAAC privacy enhancements if configured.
+        if [ "${SLAAC_PRIVIPGEN[$i]}" = "yes" ]; then
+          if [ -n "${SLAAC_SECRET[$i]}" ]; then
+            debug_log "${1}: seeding secret and enabling private IPv6 generation"
+            echo "${SLAAC_SECRET[$i]}" >/proc/sys/net/ipv6/conf/${1}/stable_secret
+            echo "2" >/proc/sys/net/ipv6/conf/${1}/addr_gen_mode
+          else
+            debug_log "${1}: using random secret and enabling private IPv6 generation"
+            echo -n >/proc/sys/net/ipv6/conf/${1}/stable_secret
+            echo "3" >/proc/sys/net/ipv6/conf/${1}/addr_gen_mode
+          fi
+        fi
+        if [ "${SLAAC_TEMPADDR[$i]}" = "yes" ]; then
+          debug_log "${1}: enabling SLAAC tempaddr"
+          echo "2" >/proc/sys/net/ipv6/conf/${1}/use_tempaddr
+        fi
+        # Enable auto configuration of interfaces:
+        echo "1" >/proc/sys/net/ipv6/conf/${1}/autoconf
+        # Bring the interface up:
+        debug_log "/sbin/ip link set dev ${1} up"
+        /sbin/ip link set dev ${1} up
+        echo "${1}: waiting for router announcement"
+        for ((j = ${SLAAC_TIMEOUT[$i]:=15} * 2; j--;)); do # by default, wait a max of 15 seconds for the interface to configure
+          /sbin/ip -6 address show dynamic dev ${1} 2>/dev/null | grep -Ewq 'inet6' && { IF_UP=1; break; }
+          sleep 0.5
+        done
+        if ((IF_UP != 1)); then
+          echo "${1}: timed out"
+          info_log "${1}: failed to auto configure after ${SLAAC_TIMEOUT[$i]} seconds"
+          debug_log "/sbin/ip address flush dev ${1}"
+          /sbin/ip address flush dev ${1}
+          debug_log "/sbin/ip link set dev ${1} down"
+          /sbin/ip link set dev ${1} down
+        fi
+      fi
+      # Slackware historically favours dynamic configuration over fixed IP to configure interfaces, so keep that tradition:
+      if [ "${USE_DHCP[$i]}" = "yes" ] || { [ -e /proc/sys/net/ipv6 ] && [ "${USE_DHCP6[$i]}" = "yes" ]; }; then # use dhcpcd
+        info_log "${1}: starting dhcpcd"
+        # Declare DHCP_OPTIONS array before adding new options to it:
+        local -a DHCP_OPTIONS=()
+        # Set DHCP_OPTIONS for this interface:
+        if [ -e /proc/sys/net/ipv6 ]; then
+          if [ "${USE_DHCP[$i]}" = "yes" ] && [ "${USE_DHCP6[$i]}" != "yes" ]; then # only try v4 dhcp
+            DHCP_OPTIONS+=("-4")
+          elif [ "${USE_DHCP[$i]}" != "yes" ] && [ "${USE_DHCP6[$i]}" = "yes" ]; then # only try v6 dhcp
+            DHCP_OPTIONS+=("-6")
+          fi
+        else
+          DHCP_OPTIONS+=("-4")
+        fi
+        [ -n "${DHCP_HOSTNAME[$i]}" ] && DHCP_OPTIONS+=("-h" "${DHCP_HOSTNAME[$i]}")
+        [ "${DHCP_KEEPRESOLV[$i]}" = "yes" ] && DHCP_OPTIONS+=("-C" "resolv.conf")
+        [ "${DHCP_KEEPNTP[$i]}" = "yes" ] && DHCP_OPTIONS+=("-C" "ntp.conf")
+        [ "${DHCP_KEEPGW[$i]}" = "yes" ] && DHCP_OPTIONS+=("-G")
+        [ "${DHCP_DEBUG[$i]}" = "yes" ] && DHCP_OPTIONS+=("-d")
+        # The -L option used to be hard coded into the dhcpcd command line in -current.  It was added to assist ARM users
+        # get networking up and running.  Previous versions of Slackware did not have -L hard coded - the code here keeps
+        # the 14.2 behaviour, but can be altered to make the use of -L default as in -current.  To change the behaviour,
+        # alter the test below to be: [ "${DHCP_NOIPV4LL[$i]}" != "no" ].
+        # Note: ARM users should make use of the DHCP_NOIPV4LL[x]="yes" parameter in rc.inet1.conf - this is the correct
+        # way to get the behaviour they seek.
+        [ "${DHCP_NOIPV4LL[$i]}" = "yes" ] && DHCP_OPTIONS+=("-L")
+        echo "${1}: polling for DHCP server"
+        # 15 seconds should be a reasonable default DHCP timeout.  30 was too much.
+        debug_log "/sbin/dhcpcd -t ${DHCP_TIMEOUT[$i]:-15} ${DHCP_OPTIONS[*]} ${1}"
+        if /sbin/dhcpcd -t "${DHCP_TIMEOUT[$i]:-15}" "${DHCP_OPTIONS[@]}" ${1}; then
+          # Enable accepting of RA packets if explicitly told to:
+          if [ -e /proc/sys/net/ipv6 ] && [ "${USE_RA[$i]}" = "yes" ]; then
+            debug_log "${1}: unconditionally accepting IPv6 RA"
+            echo "1" >/proc/sys/net/ipv6/conf/${1}/accept_ra
+          fi
+          IF_UP=1
+        else
+          info_log "${1}: failed to obtain DHCP lease"
+          debug_log "/sbin/ip address flush dev ${1}"
+          /sbin/ip address flush dev ${1}
+          debug_log "/sbin/ip link set dev ${1} down"
+          /sbin/ip link set dev ${1} down
+        fi
+      fi
+      if [ -e /proc/sys/net/ipv6 ] && [ -n "${IP6ADDRS[$i]}" ]; then # add v6 IPs
+        info_log "${1}: setting IPv6 addresses"
+        # IPv6's Duplicate Address Detection (DAD) causes a race condition when bringing up interfaces, as
+        # described here:  https://www.agwa.name/blog/post/beware_the_ipv6_dad_race_condition
+        # Disable DAD while bringing up the interface - but note that this means the loss of detection of a
+        # duplicate address.  It's a trade off, unfortunately.
+        debug_log "${1}: disabling IPv6 DAD"
+        echo "0" >/proc/sys/net/ipv6/conf/${1}/accept_dad
+        for V6IP in ${IP6ADDRS[$i]}; do
+          IP="${V6IP%/*}"
+          PREFIX="${V6IP#*/}"
+          if [ -z "$PREFIX" ] || [ "$IP" == "$PREFIX" ]; then
+            info_log "${1}: no prefix length set for IP $IP - assuming 64"
+            PREFIX="64"
+          fi
+          debug_log "/sbin/ip -6 address add $IP/$PREFIX dev ${1}"
+          if /sbin/ip -6 address add $IP/$PREFIX dev ${1} && /sbin/ip link set dev ${1} up; then
+            # Enable accepting of RA packets if explicitly told to.
+            if [ "${USE_RA[$i]}" = "yes" ]; then
+              debug_log "${1}: unconditionally accepting IPv6 RA"
+              echo "1" >/proc/sys/net/ipv6/conf/${1}/accept_ra
+            fi
+            IF_UP=1
+          else
+            info_log "${1}: failed to set IP $IP"
+            if ((IF_UP != 1)); then # a v4 address was configured, don't flush it
+              debug_log "/sbin/ip address flush dev ${1}"
+              /sbin/ip address flush dev ${1}
+              debug_log "/sbin/ip link set dev ${1} down"
+              /sbin/ip link set dev ${1} down
+            fi
+          fi
+        done
+        # Reset accept_dad back to default now all the IPs are configured:
+        debug_log "${1}: resetting IPv6 DAD to default"
+        cat /proc/sys/net/ipv6/conf/default/accept_dad >/proc/sys/net/ipv6/conf/${1}/accept_dad
+      fi
+      if [ -n "${IPADDRS[$i]}" ] || [ -n "${IPADDR[$i]}" ]; then # add v4 IPs
+        info_log "${1}: setting IPv4 addresses"
+        # Only use IPADDR if no dynamic configuration was done.
+        if [ "${USE_DHCP[$i]}" == "yes" ] || [ "${USE_DHCP6[$i]}" == "yes" ] || [ "${USE_SLAAC[$i]}" == "yes" ]; then
+          V4IPS="${IPADDRS[$i]}"
+        else
+          V4IPS="${IPADDRS[$i]} ${IPADDR[$i]}${NETMASK[$i]:+/${NETMASK[$i]}}"
+        fi
+        for V4IP in $V4IPS; do
+          IP="${V4IP%/*}"
+          NM="${V4IP#*/}"
+          if [ -z "$NM" ] || [ "$IP" == "$NM" ]; then
+            info_log "${1}: no netmask set for IP $IP - assuming 24 (aka, 255.255.255.0)"
+            NM="24"
+          fi
+          debug_log "/sbin/ip -4 address add $IP/$NM broadcast + dev ${1}"
+          if /sbin/ip -4 address add $IP/$NM broadcast + dev ${1} && /sbin/ip link set dev ${1} up; then
+            IF_UP=1
+          else
+            info_log "${1}: failed to set IP $IP"
+            if ((IF_UP != 1)); then # if at least one address was configured, don't flush the device
+              debug_log "/sbin/ip address flush dev ${1}"
+              /sbin/ip address flush dev ${1}
+              debug_log "/sbin/ip link set dev ${1} down"
+              /sbin/ip link set dev ${1} down
+            fi
+          fi
+        done
+      fi
+      if ((IF_UP == 1)) && [ -n "${IPALIASES[$i]}" ]; then # Only apply IPALIASES onto an up interface
+        info_log "${1}: setting extra IPv4 addresses"
+        NUM=0
+        for EXTRAIP in ${IPALIASES[$i]}; do
+          IP="${EXTRAIP%/*}"
+          NM="${EXTRAIP#*/}"
+          if [ -z "$NM" ] || [ "$IP" == "$NM" ]; then
+            info_log "${1}: no netmask set for alias IP $IP - assuming 24 (aka, 255.255.255.0)"
+            NM="24"
+          fi
+          debug_log "/sbin/ip -4 address add $IP/$NM broadcast + dev ${1} label ${1}:$NUM"
+          if /sbin/ip -4 address add $IP/$NM broadcast + dev ${1} label ${1}:$NUM; then
+            NUM=$((NUM + 1))
+          else
+            info_log "${1}: failed to add alias IP $IP"
+          fi
+        done
+      fi
+      if ((IF_UP == 1)); then
+        # Force an MTU (possibly overriding that set by DHCP or RA):
+        if [ -n "${MTU[$i]}" ]; then
+          info_log "${1}: setting custom MTU"
+          debug_log "/sbin/ip link set dev ${1} mtu ${MTU[$i]}"
+          if ! /sbin/ip link set dev ${1} mtu ${MTU[$i]}; then
+            info_log "${1}: failed to set MTU"
+          fi
+        fi
+        # Set promiscuous mode on the interface:
+        if [ "${PROMISCUOUS[$i]}" = "yes" ]; then
+          info_log "${1}: setting promiscuous mode"
+          debug_log "/sbin/ip link set dev ${1} promisc on"
+          if ! /sbin/ip link set dev ${1} promisc on; then
+            info_log "${1}: failed to set promiscuous mode"
+          fi
+        fi
+      fi
+    else
+      debug_log "${1}: skipping configuration - already up"
+    fi
+  else
+    debug_log "${1}: skipping configuration - does not exist (yet)"
+  fi
+}
+
+# Function to take down a network interface:
+if_down() {
+  # Determine position 'i' of this interface in the IFNAME array:
+  i=0
+  while [ $i -lt $MAXNICS ]; do
+    [ "${IFNAME[$i]}" = "${1}" ] && break
+    i=$((i+1))
+  done
+  if [ $i -ge $MAXNICS ]; then
+    info_log "${1}: skipping - you might need to increase MAXNICS"
+    return
+  fi
+  info_log "${1}: de-configuring interface"
+  if [ -e /sys/class/net/${1} ]; then
+    if [ "${USE_DHCP[$i]}" = "yes" ] || [ "${USE_DHCP6[$i]}" = "yes" ]; then # take down dhcpcd
+      info_log "${1}: stopping dhcpcd"
+      # When using -k, dhcpcd requires some command line options to match those used to invoke it:
+      if [ "${USE_DHCP[$i]}" = "yes" ] && [ "${USE_DHCP6[$i]}" != "yes" ]; then # only v4 dhcp
+        DHCP_OPTIONS=( -4 )
+      elif [ "${USE_DHCP[$i]}" != "yes" ] && [ "${USE_DHCP6[$i]}" = "yes" ]; then # only v6 dhcp
+        DHCP_OPTIONS=( -6 )
+      fi
+      debug_log "/sbin/dhcpcd ${DHCP_OPTIONS[*]} -k -d ${1}"
+      /sbin/dhcpcd "${DHCP_OPTIONS[*]}" -k -d ${1} 2>/dev/null || info_log "${1}: failed to stop dhcpcd"
+    fi
+    # Disable v6 IP auto configuration and RA before trying to clear the IP from the interface:
+    if [ -e /proc/sys/net/ipv6 ]; then
+      debug_log "${1}: disabling IPv6 autoconf and RA"
+      echo "0" >/proc/sys/net/ipv6/conf/${1}/autoconf
+      echo "0" >/proc/sys/net/ipv6/conf/${1}/accept_ra
+    fi
+    sleep 0.5 # allow time for DHCP/RA to unconfigure the interface
+    # Flush any remaining IPs:
+    debug_log "/sbin/ip address flush dev ${1}"
+    /sbin/ip address flush dev ${1}
+    # Bring the interface down:
+    debug_log "/sbin/ip link set dev ${1} down"
+    /sbin/ip link set dev ${1} down
+    # Reset everything back to defaults:
+    if [ -e /proc/sys/net/ipv6 ]; then
+      debug_log "${1}: resetting IPv6 configuration to defaults"
+      cat /proc/sys/net/ipv6/conf/default/autoconf >/proc/sys/net/ipv6/conf/${1}/autoconf
+      cat /proc/sys/net/ipv6/conf/default/accept_ra >/proc/sys/net/ipv6/conf/${1}/accept_ra
+      cat /proc/sys/net/ipv6/conf/default/use_tempaddr >/proc/sys/net/ipv6/conf/${1}/use_tempaddr
+      cat /proc/sys/net/ipv6/conf/default/addr_gen_mode >/proc/sys/net/ipv6/conf/${1}/addr_gen_mode
+      echo -n >/proc/sys/net/ipv6/conf/${1}/stable_secret
+    fi
+    # If the interface is a bridge, then destroy it now:
+    [ -n "${BRNICS[$i]}" ] && br_close $i
+    # If the interface is a bond, then destroy it now.
+    [ -n "${BONDNICS[$i]}" ] && bond_destroy $i
+    # Take down VLAN interface, if configured.
+    if echo "${1}" | grep -Fq .; then
+      info_log "${1}: destroying VLAN interface"
+      debug_log "/sbin/ip link set dev ${1} down"
+      /sbin/ip link set dev ${1} down
+      debug_log "/sbin/ip link delete ${1}"
+      /sbin/ip link delete ${1}
+      if ! /sbin/ip address show scope global dev ${1%.*} 2>/dev/null | grep -Ewq '(inet|inet6)'; then
+        debug_log "/sbin/ip link set dev ${1%.*} down"
+        /sbin/ip link set dev ${1%.*} down
+      fi
+    fi
+    # Kill wireless daemons if any:
+    if [ -x /etc/rc.d/rc.wireless ]; then
+      . /etc/rc.d/rc.wireless ${1} stop
+    fi
+  fi
+}
+
+#####################
+# GATEWAY FUNCTIONS #
+#####################
+
+# Function to bring up the gateway if there is not yet a default route:
+gateway_up() {
+  info_log "Configuring gateways"
+  # Bring up the IPv4 gateway:
+  if [ -n "$GATEWAY" ]; then
+    if ! /sbin/ip -4 route show | grep -wq default; then
+      debug_log "/sbin/ip -4 route add default via ${GATEWAY}"
+      /sbin/ip -4 route add default via ${GATEWAY}
+    fi
+  fi
+  # Bring up the IPv6 gateway:
+  if [ -n "$GATEWAY6" ]; then
+    if ! /sbin/ip -6 route show | grep -wq default; then
+      debug_log "/sbin/ip -6 route add default via ${GATEWAY6}"
+      /sbin/ip -6 route add default via ${GATEWAY6}
+    fi
+  fi
+}
+
+# Function to take down an existing default gateway:
+gateway_down() {
+  info_log "De-configuring gateways"
+  if /sbin/ip -4 route show | grep -wq default ; then
+    debug_log "/sbin/ip -4 route del default"
+    /sbin/ip -4 route del default
+  fi
+  if /sbin/ip -6 route show | grep -wq default ; then
+    debug_log "/sbin/ip -6 route del default"
+    /sbin/ip -6 route del default
+  fi
+}
+
+# Function to start the network:
+start() {
+  echo "Starting the network interfaces..."
+  lo_up
+  virtif_create
+  for i in "${IFNAME[@]}" ; do
+    if_up $i
+  done
+  gateway_up
+}
+
+# Function to stop the network:
+stop() {
+  echo "Stopping the network interfaces..."
+  gateway_down
+  for (( i = MAXNICS - 1; i >= 0; i-- )); do
+    if_down ${IFNAME[$i]}
+  done
+  virtif_destroy
+  lo_down
+}
+
+
+############
+### MAIN ###
+############
+
+# extglob is required for some functionallity.
+shopt -s extglob
+
+case "${1}" in
+start|up) # "start" (or "up") brings up all configured interfaces:
+  start
+  ;;
+stop|down) # "stop" (or "down") takes down all configured interfaces:
+  stop
+  ;;
+restart) # "restart" restarts the network:
+  stop
+  start
+  ;;
+lo_start|lo_up) # Start the loopback interface:
+  lo_up
+  ;;
+lo_stop|lo_down) # Stop the loopback interface:
+  lo_down
+  ;;
+*_start|*_up) # Example: "eth1_start" (or "eth1_up") will start the specified interface 'eth1'
+  INTERFACE=$(echo ${1} | /bin/cut -d '_' -f 1)
+  if_up $INTERFACE
+  gateway_up
+  ;;
+*_stop|*_down) # Example: "eth0_stop" (or "eth0_down") will stop the specified interface 'eth0'
+  INTERFACE=$(echo ${1} | /bin/cut -d '_' -f 1)
+  if_down $INTERFACE
+  ;;
+*_restart) # Example: "wlan0_restart" will take 'wlan0' down and up again
+  INTERFACE=$(echo ${1} | /bin/cut -d '_' -f 1)
+  if_down $INTERFACE
+  sleep 1
+  if_up $INTERFACE
+  gateway_up
+  ;;
+*) # The default is to bring up all configured interfaces:
+  start
+esac
+
+# End of /etc/rc.d/rc.inet1
Index: rc.inet1.conf
===================================================================
--- rc.inet1.conf	(nonexistent)
+++ rc.inet1.conf	(revision 5)
@@ -0,0 +1,240 @@
+# /etc/rc.d/rc.inet1.conf
+#
+# This file contains the configuration settings for network interfaces.
+#
+# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
+# If you don't have an interface, leave the settings null ("").
+#
+# You can configure network interfaces other than eth0,eth1... by setting
+# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
+# or empty, it is assumed you're configuring eth<interface>.
+#
+# Several other parameters are available; the end of this file contains a
+# comprehensive set of examples.
+#
+# Important note for IPv6 stateless auto configuration (SLAAC) users:
+# From Slackware 15.0 onwards, you need to set USE_SLAAC[0]="yes" below.
+
+# =============================================================================
+
+# IPv4 config options for eth0:
+IPADDRS[0]=""
+USE_DHCP[0]=""
+# IPv6 config options for eth0:
+IP6ADDRS[0]=""
+USE_SLAAC[0]=""
+USE_DHCP6[0]=""
+# Generic options for eth0:
+DHCP_HOSTNAME[0]=""
+
+# IPv4 config options for eth1:
+IPADDRS[1]=""
+USE_DHCP[1]=""
+# IPv6 config options for eth1:
+IP6ADDRS[1]=""
+USE_SLAAC[1]=""
+USE_DHCP6[1]=""
+# Generic options for eth1:
+DHCP_HOSTNAME[1]=""
+
+# IPv4 config options for eth2:
+IPADDRS[2]=""
+USE_DHCP[2]=""
+# IPv6 config options for eth2:
+IP6ADDRS[2]=""
+USE_SLAAC[2]=""
+USE_DHCP6[2]=""
+# Generic options for eth2:
+DHCP_HOSTNAME[2]=""
+
+# IPv4 config options for eth3:
+IPADDRS[3]=""
+USE_DHCP[3]=""
+# IPv6 config options for eth3:
+IP6ADDRS[3]=""
+USE_SLAAC[3]=""
+USE_DHCP6[3]=""
+# Generic options for eth3:
+DHCP_HOSTNAME[3]=""
+
+# IPv4 default gateway IP address:
+GATEWAY=""
+# IPv6 default gateway IP address:
+GATEWAY6=""
+
+# =============================================================================
+
+# Example of how to configure a bond (link aggregation) interface.
+# Note the addition of the BONDNICS and BONDMODE parameters.
+# BONDNICS is a space delimited list of interfaces to add to this bond.  The
+# BONDNICS interfaces will be brought up and configured while bringing up the
+# bond interface, so do not need to be previously defined in rc.inet1.conf.
+# BONDMODE sets the bonding mode for this interface.  If not specified when
+# BONDNICS has been used, the default is 'balance-rr'.
+# IFOPTS is a pipe (|) delimited list of bonding module specific settings to be
+# applied to the interface, and should always include the 'miimon' option when
+# configuring bonding - not using this option will result in network
+# degradation.  In 'active-backup' mode, the 'primary' option should also be
+# supplied.  When using '802.3ad' mode, set "lacp_rate fast" for faster
+# recovery from an interface failure.  In other modes, the 'xmit_hash_policy'
+# should be set.  See the /usr/src/linux/Documentation/networking/bonding.txt
+# file (search for "Bonding Driver Options") for the full set of options.
+#IFNAME[0]="bond0"
+#BONDNICS[0]="eth0 eth1"
+#BONDMODE[0]="balance-rr"
+#IFOPTS[0]="xmit_hash_policy layer2+3 | miimon 100"
+#IPADDRS[0]="192.168.0.1/24"
+#USE_DHCP[0]=""
+#DHCP_HOSTNAME[0]=""
+#IP6ADDRS[0]=""
+#USE_SLAAC[0]=""
+#USE_DHCP6[0]=""
+
+# =============================================================================
+
+# Example of how to configure a VLAN interface:
+# The VLAN ID is taken from the full interface name, which is comprised of the
+# underlying interface name, a period (.) and then the VLAN ID.
+# IFOPTS is a pipe (|) delimited list of VLAN module specific settings to be
+# applied to the interface.  See the ip-link(8) man page (search for "VLAN Type
+# Support") for details of the options available.  This option is not required
+# for a standard VLAN to be configured.
+#IFNAME[0]="eth0.10"
+#IFOPTS[0]=""
+#IPADDRS[0]="192.168.10.1/24"
+#USE_DHCP[0]=""
+#DHCP_HOSTNAME[0]=""
+#IP6ADDRS[0]=""
+#USE_SLAAC[0]=""
+#USE_DHCP6[0]=""
+
+# =============================================================================
+
+# Example of how to configure a bridge:
+# Note the added "BRNICS" variable which contains a space-separated list
+# of the physical or virtual network interfaces you want to add to the bridge.
+# IFOPTS is a pipe (|) delimited list of bridge module specific settings to be
+# applied to the interface.  See the ip-link(8) man page (search for "BRIDGE
+# Type Support") for details of the options available.  This option is not
+# required for a standard bridge to be configured.
+#IFNAME[0]="br0"
+#BRNICS[0]="eth0"
+#IFOPTS[0]=""
+#IPADDRS[0]="192.168.0.1/24"
+#USE_DHCP[0]=""
+#DHCP_HOSTNAME[0]=""
+
+# =============================================================================
+
+# Virtual interfaces to create - these are created before any address
+# configuration or bridge setup is done, so you may use these interfaces
+# as IFNAME or BRNICS values. These can be tun or tap interfaces:
+# adjust VIRTIFNAME and VIRTIFTYPE accordingly.
+# Starting with VIRTIFNAME[0] is mandatory, and each next one must be
+# incremented by one, so VIRTIFNAME[1], VIRTIFNAME[2], and so on.
+# Virtual tap interface example
+#VIRTIFNAME[0]="tap0"
+#VIRTIFTYPE[0]="tap"
+#VIRTIFUSER[0]="root"
+#VIRTIFGROUP[0]="root"
+
+# Virtual tun interface example
+#VIRTIFNAME[1]="tun0"
+#VIRTIFTYPE[1]="tun"
+#VIRTIFUSER[1]="someuser"
+#VIRTIFGROUP[1]="somegroup"
+
+# =============================================================================
+
+# Example config information for wlan0:
+# Uncomment the lines you need and fill in your data.  You may not need all of
+# these for your wireless network.
+#IFNAME[4]="wlan0"
+#IPADDRS[4]=""
+#USE_DHCP[4]="yes"
+#DHCP_HOSTNAME[4]="icculus-wireless"
+#DHCP_KEEPRESOLV[4]="yes"
+#DHCP_KEEPNTP[4]="yes"
+#DHCP_KEEPGW[4]="yes"
+#DHCP_IPADDR[4]=""
+#WLAN_ESSID[4]=DARKSTAR
+#WLAN_MODE[4]=Managed
+#WLAN_RATE[4]="54M auto"
+#WLAN_CHANNEL[4]="auto"
+#WLAN_KEY[4]="D5A31F54ACF0487C2D0B1C10D2"
+#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
+#WLAN_WPA[4]="wpa_supplicant"
+#WLAN_WPADRIVER[4]="wext"
+#WLAN_WPAWAIT[4]=30
+
+# =============================================================================
+
+# Some examples of additional network parameters that you can use.
+#IFNAME[4]="wlan0"              # Use a different interface name instead of
+                                # the default 'eth4'
+#IFOPTS[4]=""                   # A pipe (|) delimited list of interface type
+                                # specific options to apply.  These options
+                                # can be found in the ip-link(8) man page in
+                                # the approprite section for the interface
+                                # type being configured.
+#HWADDR[4]="00:01:23:45:67:89"  # Overrule the card's hardware MAC address
+#MTU[4]=""                      # The default MTU is 1500, but you might need
+                                # 1360 when you use NAT'ed IPSec traffic.
+#PROMISCUOUS[4]="yes"           # Set promiscuous mode on the interface.
+#DHCP_TIMEOUT[4]="15"           # The default timeout for the DHCP client to
+                                # wait for server resonse is 15 seconds, but
+                                # you might want a shorter or longer wait.
+#DHCP_KEEPRESOLV[4]="yes"       # If you don't want /etc/resolv.conf overwritten
+#DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
+#DHCP_KEEPGW[4]="yes"           # If you don't want the DHCP server to change
+                                # your default gateway
+#DHCP_IPADDR[4]=""              # Request a specific IP address from the DHCP
+                                # server
+#DHCP_DEBUG[4]="yes"            # Make dhcpcd show verbose diagnostics
+#DHCP_NOIPV4LL[4]="yes"         # Do not assign an ipv4ll address when a DHCP
+                                # server is not found (ipv4ll link-local
+                                # adresses in the IP range 169.254.0.0/16 are
+                                # also known as "zeroconf" addresses)
+#SLAAC_TIMEOUT[4]="15"          # The default timeout for auto configuration to
+                                # wait for the interface to come up is 15 sec.
+                                # Increase the timeout if required.
+#SLAAC_PRIVIPGEN[4]="yes"       # When assigning addresses via SLAAC, use the
+                                # 'private' (RFC7217) address generation method.
+                                # It is advisable to also set SLAAC_SECRET[x].
+#SLAAC_SECRET[4]="xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx"
+                                # When SLAAC_PRIVIPGEN[x]="yes" is set, this is
+                                # the secret to be used.  This must be in the
+                                # form of an IPv6 address.  When left unset, a
+                                # random secret is used (this is the default).
+#SLAAC_TEMPADDR[4]="yes"        # Use a temporary address with SLAAC to enhance
+                                # security.
+#USE_RA[4]="yes"                # Accept router advertisements even when SLAAC
+                                # is disabled on the interface.
+#WLAN_ESSID[4]="DARKSTAR"       # An example of how you can override _any_
+                                # parameter defined in rc.wireless.conf, by
+                                # prepending 'WLAN_' to the parameter's name.
+                                # Useful with multiple wireless interfaces.
+#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=thekey"
+                                # Some drivers require a private ioctl to be
+                                # set through the iwpriv command. If more than
+                                # one is required, you can place them in the
+                                # IWPRIV parameter (separated with the pipe (|)
+                                # character, see the example).
+#WLAN_WPA[4]="wpa_supplicant"   # Run wpa_supplicant for WPA support
+#WLAN_WPADRIVER[4]="ndiswrapper"# Tell wpa_supplicant to specifically use the
+                                # ndiswrapper driver (if you leave this empty
+                                # the 'wext' driver is used by default)
+#WLAN_WPAWAIT[4]="30"           # In case it takes long for the WPA association
+                                # to finish, you can increase the wait time
+                                # (defaults to 10 seconds)
+
+# =============================================================================
+
+# Change this to "yes" for debugging output to syslog (if available, stdout if
+# not).
+DEBUG_ETH_UP="no"
+
+# MAXNICS is the maximum number of interfaces that will be configured.
+# You may need to increase the MAXNICS value if you have many interfaces, or
+# you use multiple VLANs and/or bridges.  The default is 6.
+#MAXNICS="6"
Index: rc.inet2
===================================================================
--- rc.inet2	(nonexistent)
+++ rc.inet2	(revision 5)
@@ -0,0 +1,141 @@
+#!/bin/sh
+#
+# rc.inet2      This shell script boots up the entire network system.
+#               Note, that when this script is used to also fire
+#               up any important remote NFS disks (like the /usr
+#               directory), care must be taken to actually
+#               have all the needed binaries online _now_ ...
+#
+#               Uncomment or comment out sections depending on which
+#               services your site requires.
+#
+# Author:       Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+# Modified by:  Patrick Volkerding <volkerdi@slackware.com>
+#               Andrey V. Kosteltsev,  <kx@radix.pro>
+#
+
+
+# At this point, we are (almost) ready to talk to The World...
+
+
+# If there is a firewall script, run it before enabling packet forwarding.
+# See the HOWTOs on http://www.netfilter.org/ for documentation on
+# setting up a firewall or NAT on Linux. In some cases this might need to
+# be moved past the section below dealing with IP packet forwarding.
+if [ -x /etc/rc.d/rc.firewall ]; then
+  /etc/rc.d/rc.firewall start
+fi
+
+# Turn on IPv4 packet forwarding support.
+if [ -x /etc/rc.d/rc.ip_forward ]; then
+  /etc/rc.d/rc.ip_forward start
+fi
+
+# Start krb5kdc, which is the Kerberos version 5 Authentication Service
+# and Key Distribution Center (AS/KDC). This needs to run first on both
+# master and secondary KDCs.
+if [ -x /etc/rc.d/rc.krb5kdc ]; then
+  /etc/rc.d/rc.krb5kdc start
+fi
+
+# Start the Kerberos administration server. This typically runs on the
+# master Kerberos server, which stores the KDC database.
+if [ -x /etc/rc.d/rc.kadmind ]; then
+  /etc/rc.d/rc.kadmind start
+fi
+
+# Start the Kerberos V5 slave KDC update server. This runs on a slave
+# (secondary) KDC server. It allows the master Kerberos server to use
+# kprop(8) to propagate its database to the slave servers.
+if [ -x /etc/rc.d/rc.kpropd ]; then
+  /etc/rc.d/rc.kpropd start
+fi
+
+# Mount remote (NFS) filesystems:
+if cat /etc/fstab | grep -v '^#' | grep -w nfs 1> /dev/null 2> /dev/null ; then
+  # Start rpc.portmap, /sbin/rpc.lockd, and /sbin/rpc.statd if we find NFS
+  # volumes defined in /etc/fstab since these will need to be running in order
+  # to mount them. If they are not running, attempting to mount an NFS
+  # partition will cause mount to hang, or at least result in unreliable
+  # operation. Keep this in mind if you plan to mount unlisted NFS
+  # partitions... 
+  # If you have uncommented NFS partitions in your /etc/fstab, rc.rpc is run
+  # whether it is set as executable or not. If you don't want to run it,
+  # comment the NFS partitions out in /etc/fstab or erase/rename rc.rpc.
+  if [ -r /etc/rc.d/rc.rpc ]; then
+    sh /etc/rc.d/rc.rpc start
+  fi
+  echo "Mounting remote (NFS) file systems:  /sbin/mount -a -t nfs"
+  /sbin/mount -a -t nfs          # This may be our /usr runtime!
+  # Show the mounted volumes:
+  /sbin/mount -v -t nfs
+fi
+
+# If /etc/rc.d/rc.rpc is executable, run it to load rpc.portmap, rpc.lockd,
+# and rpc.statd. This might be needed to mount NFS partitions that are not
+# listed in /etc/fstab. Starting this twice won't hurt as the script will
+# check if things are already running before trying to start them.
+if [ -x /etc/rc.d/rc.rpc ]; then
+  /etc/rc.d/rc.rpc start
+fi
+
+# Mount remote CIFS filesystems. Note that where possible, using CIFS is
+# preferred over SMBFS. SMBFS is no longer actively maintained.
+if cat /etc/fstab | grep -v '^#' | grep -w cifs 1> /dev/null 2> /dev/null ; then
+  echo "Mounting remote CIFS file systems:  /sbin/mount -a -t cifs"
+  /sbin/mount -a -t cifs
+  # Show the mounted volumes:
+  /sbin/mount -v -t cifs
+fi
+
+# Mount remote SMB filesystems:
+if cat /etc/fstab | grep -v '^#' | grep -w smbfs 1> /dev/null 2> /dev/null ; then
+  echo "Mounting remote SMBFS file systems:  /sbin/mount -a -t smbfs"
+  /sbin/mount -a -t smbfs
+  # Show the mounted volumes:
+  /sbin/mount -v -t smbfs
+fi
+
+# Start the system logger if it is not already running (maybe because /usr
+# is on a network partition). NOTE: Don't put /usr on a network partition,
+# or even a separate local partition. This is not supported and is likely to
+# cause some problems...
+if [ -x /etc/rc.d/rc.syslog -a -d /var/log -a ! -r /var/run/syslogd.pid ]; then
+  /etc/rc.d/rc.syslog start
+fi
+
+# Start the inetd server:
+if [ -x /etc/rc.d/rc.inetd ]; then
+  /etc/rc.d/rc.inetd start
+fi
+
+# Start the OpenSSH SSH daemon:
+if [ -x /etc/rc.d/rc.sshd ]; then
+  echo "Starting OpenSSH SSH daemon:  /usr/sbin/sshd"
+  /etc/rc.d/rc.sshd start
+fi
+
+# Start the BIND name server daemon:
+if [ -x /etc/rc.d/rc.bind ]; then
+  /etc/rc.d/rc.bind start
+fi
+
+# Start NIS (the Network Information Service):
+if [ -x /etc/rc.d/rc.yp ]; then
+  /etc/rc.d/rc.yp start
+fi
+
+# Start OpenVPN:
+if [ -x /etc/rc.d/rc.openvpn ]; then
+  /etc/rc.d/rc.openvpn start
+fi
+
+# Start the NFS server. Note that for this to work correctly, you'll
+# need nfsd support in the kernel (the startup script will try to load
+# the module for you).
+# You'll also need to set up some shares in /etc/exports.
+# Starting the NFS server:
+if [ -x /etc/rc.d/rc.nfsd ]; then
+  /etc/rc.d/rc.nfsd start
+fi
+
Index: rc.keymap
===================================================================
--- rc.keymap	(nonexistent)
+++ rc.keymap	(revision 5)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Load the keyboard map.  More maps are in /usr/share/kbd/keymaps.
+if [ -x /usr/bin/loadkeys ]; then
+  /usr/bin/loadkeys ru-rCtrl-utf8
+fi
Index: rc.local
===================================================================
--- rc.local	(nonexistent)
+++ rc.local	(revision 5)
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.local  -  Local system initialization script.
+#
+# Put any local startup commands in here.
+#
+
Index: rc.local_shutdown
===================================================================
--- rc.local_shutdown	(nonexistent)
+++ rc.local_shutdown	(revision 5)
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.local_shutdown  -  Local system shutdown script.
+#
+# If you have anything that needs to be run at shutdown time
+# you can put those commands in here.
+#
+
Index: rc.loop
===================================================================
--- rc.loop	(nonexistent)
+++ rc.loop	(revision 5)
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Load the loop device kernel module.
+#
+
+if modinfo loop 1> /dev/null 2> /dev/null ; then
+  if ! lsmod | grep -wq "^loop" ; then
+    modprobe loop
+  fi
+fi
Index: rc.modules
===================================================================
--- rc.modules	(nonexistent)
+++ rc.modules	(revision 5)
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# /etc/rc.d/rc.modules
+
+# Determine the version of the running kernel:
+RELEASE=$(uname -r)
+
+# Update kernel module dependencies:
+if [ -e "/lib/modules/$RELEASE/modules.dep" ]; then 
+  echo "Updating module dependency list for $RELEASE:  /sbin/depmod --quick"
+  /sbin/depmod --quick
+else 
+  echo "Creating module dependency list for $RELEASE:  /sbin/depmod --all"
+  /sbin/depmod --all
+fi
+
+# Run any rc.modules-$(uname -r) file that exists (this is used
+# if you have specific modules which should only be loaded for
+# specific kernel versions):
+if [ -x "/etc/rc.d/rc.modules-$RELEASE" ]; then
+  /etc/rc.d/rc.modules-$RELEASE
+fi
+
+# Run a local (sysadmin-version) of rc.modules if it exists:
+if [ -x "/etc/rc.d/rc.modules.local" ]; then
+  /etc/rc.d/rc.modules.local
+fi
Index: rc.modules.local
===================================================================
--- rc.modules.local	(nonexistent)
+++ rc.modules.local	(revision 5)
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# /etc/rc.d/rc.modules.local
+
+# The Linux kernel source is the best place to look for documentation
+# for the many available kernel modules.  This can be found under
+# /usr/src/linux-$VERSION/Documentation/.
+
+# Almost all necessary modules are automatically loaded when needed,
+# but there are a few exceptions.  Here's a (not all-inclusive) list,
+# so uncomment any of the below entries or add others as needed:
+# Note that you could also create/edit rc.modules-$version if you
+# only wanted specific modules loaded for particular kernels.
+
+#/sbin/modprobe tun            # Universal TUN/TAP device driver
+#/sbin/modprobe sg             # Generic SCSI support for SATA DVD-RW
Index: rc.sysvinit
===================================================================
--- rc.sysvinit	(nonexistent)
+++ rc.sysvinit	(revision 5)
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# rc.sysvinit   This file provides basic compatibility with SystemV style
+#               startup scripts. The SystemV style init system places start/stop
+#               scripts for each runlevel into directories such as /etc/rc.d/rc3.d
+#               (for runlevel 3) instead of starting them from /etc/rc.d/rc.M.
+#               This makes for a lot more init scripts, and a more complicated
+#               execution path to follow through if something goes wrong. For
+#               this reason, Radix has always used the traditional BSD style
+#               init script layout.
+#
+#               However, many binary packages exist that install SystemV init scripts.
+#               With rc.sysvinit in place, most well-written startup scripts will work.
+#               This is primarily intended to  support commercial software, though,
+#               and probably shouldn't be considered bug free.
+#
+#               Written by Patrick Volkerding <volkerdi@slackware.com>, 1999
+#               from an example by Miquel van Smoorenburg <miquels@cistron.nl>.
+
+# Run an init script:
+startup() {
+  case "$1" in
+  *.sh)
+    sh "$@"
+    ;;
+  *)
+    "$@"
+    ;;
+  esac
+}
+
+# Set onlcr to avoid staircase effect.
+stty onlcr 0>&1
+
+if [ "$runlevel" = "" ]; then
+  runlevel=$RUNLEVEL
+  export runlevel
+  prevlevel=$PREVLEVEL
+  export prevlevel
+fi
+
+# Run kill scripts in the previous runlevel if not "none"
+if [ ! "$prevlevel" = "N" ]; then
+  for script in /etc/rc.d/rc$prevlevel.d/K* ; do
+    if [ -x $script ]; then
+      startup $script stop
+    fi
+  done
+fi
+
+# Now do the startup scripts:
+for script in /etc/rc.d/rc$runlevel.d/S* ; do
+  if [ -x $script ]; then
+    startup $script start
+  fi
+done
Index: rc.wireless
===================================================================
--- rc.wireless	(nonexistent)
+++ rc.wireless	(revision 5)
@@ -0,0 +1,351 @@
+#!/bin/sh
+# /etc/rc.d/rc.wireless
+# $Id: rc.wireless,v 1.13 2007/04/13 14:14:43 eha Exp eha $
+#
+# Wireless network card setup.
+#
+# This script sets up PCI, USB, and 32-bit Cardbus wireless devices
+# NOT 16-bit PCMCIA cards!  Those are configured in /etc/pcmcia/.
+# Single parameter to this script is the name of a network interface.
+# Normally this script is called from rc.inet1 rather than run
+# directly.
+#
+# This script is a modified '/etc/pcmcia/wireless' script
+# 09/apr/2004 by Eric Hameleers
+# 16/sep/2004 * Eric Hameleers * Fixed iwspy and iwpriv commands
+# 08/apr/2005 * Eric Hameleers * Allow per-interface overrides of the wireless
+#                                parameters (see /etc/rc.d/rc.inet1.conf)
+# 11/apr/2005 * Eric Hameleers * Tune wpa_supplicant interactions.
+# 23/apr/2005 * Eric Hameleers * First configure card with iwconfig,
+#                                before starting wpa_supplicant
+# 27/apr/2005 * Eric Hameleers * Multiple 'iwpriv $INTERFACE set' commands.
+# 14/feb/2006 * Eric Hameleers * Better error messages; alternative way of
+#                                getting HWADDR; parametrized WPA_WAIT value.
+#                                Don't kill an already running wpa_supplicant.
+# 29/apr/2006 * Pat Volkerding * Reverted HWADDR change, since it relies on
+#                                a binary (macaddr) that is not built or
+#                                installed by default since it is not
+#                                compatible with all interfaces.
+# 15/aug/2006 * Eric Hameleers * Added missing "" around $ESSID, which broke
+#                                ESSIDs that contain a space character.
+# 10/oct/2006 * Eric Hameleers * Added default empty values for all parameters.
+#                                This makes a second wireless card leave
+#                                wpa_supplicant alone if WPA is not configured.
+# 15/oct/2006 * Eric Hameleers * Swapped the calls to "key <key>" and
+#                                "key restricted" since that might be needed
+#                                for WEP to work reliably.
+# 09/jan/2007 * Eric Hameleers * Add explicit default values to wireless params;
+#                                also set the ESSID before IWPRIV commands,
+#                                needed for some RaLink cards;
+#                                use /proc/net/wireless instead of calling
+#                                iwconfig to determine if a card is wireless.
+# 13/apr/2007 * Eric Hameleers * Use of the IWPRIV variable was broken.
+#                                NOTE: if you need to enter multiple parameters
+#                                in IWPRIV, you must separate them with the pipe
+#                                (|) character - this used to be a space char!
+#                                See the example in rc.inet1.conf.
+# 16/apr/2008 * Pat Volkerding * Make sure that HWADDR is all upper case.
+# 23/apr/2008 * Pat Volkerding * Increase sleep time after bringing up an
+#                                interface to 3 seconds.  Some drivers
+#                                need this additional time to initalize.
+# 02/jan/2010 * Pat Volkerding * Look for /sys/class/net/$NETDEV/wireless rather
+#                                than the contents of /proc/net/wireless to find
+#                                if a network device is wireless.  In newer
+#                                kernels devices will not show up in
+#                                /proc/net/wireless until active.
+# 16/aug/2012 * Pat Volkerding * Use several tests to determine if an interface
+#                                is wireless, as the reliability of any given
+#                                test may depend on the kernel options and the
+#                                wireless driver used.
+#                                Convert the MAC address to uppercase in sed.
+# 11/Nov/2019 * Darren Austin *  Log to syslog, failling back to stdout.
+#                                Output error to stderr if not called from
+#                                rc.inet1.
+# 09/Mar/2021 * Darren Austin *  Don't leave the interface in an 'up' state upon
+#                                exit from the script - this causes problems for
+#                                SLAAC in rc.inet1 when control is returned.
+# ------------------------------------------------------------------------------
+
+# If possible, log events in /var/log/messages:
+if [ -f /var/run/syslogd.pid ] && [ -x /usr/bin/logger ]; then
+  LOGGER=/usr/bin/logger
+else # output to stdout/stderr:
+  LOGGER=/bin/cat
+fi
+
+if [ -z "$IFNAME" ] ; then
+  echo "ERROR: The script 'rc.wireless' must be executed by 'rc.inet1'!" >&2
+  echo "       You should run the command \"/etc/rc.d/rc.inet1 <your_interface>_start\" yourself." >&2
+  return 1 2> /dev/null || exit 1
+fi
+
+INTERFACE=$1
+
+# Find the path where wireless tools are installed
+for IWPATH in /usr/{bin,sbin} /usr/local/{bin,sbin} /sbin /bin ; do
+    if [ -x $IWPATH/iwconfig ] ; then break ; fi
+done
+
+# The same for wpa_supplicant (needed for WPA support)
+for SUPPATH in /usr/{bin,sbin} /usr/local/{bin,sbin} /sbin /bin ; do
+    if [ -x $SUPPATH/wpa_supplicant ] ; then break ; fi
+done
+
+# Set all desired settings through the wireless tools
+IWCOMMAND="$IWPATH/iwconfig ${INTERFACE}"
+IWPRIVCMD="$IWPATH/iwpriv ${INTERFACE}"
+IWSPYCMD="$IWPATH/iwspy ${INTERFACE}"
+IFCOMMAND="/sbin/ip link set dev ${INTERFACE}"
+
+is_wireless_device ()
+{
+    # Return 0 for a wireless interface, or 1 for a non-wireless interface.
+    if [ -d /sys/class/net/${1}/wireless ]; then
+        return 0
+    elif grep -Fxq 'DEVTYPE=wlan' /sys/class/net/${1}/uevent 2>/dev/null; then 
+        return 0
+    elif LC_ALL=C $IWPATH/iwconfig $1 2>&1 | grep -q "IEEE 802.11" ; then
+        return 0
+    else # all tests failed, assume the device is not wireless (or add a better test :)
+        return 1
+    fi
+}
+
+###############
+# EXIT POINTS #
+###############
+
+# Is the device wireless?  If not, exit this script.
+is_wireless_device ${INTERFACE} || return 0 2> /dev/null || exit 0
+
+# If we stop a wireless interface using wpa_supplicant,
+# we'll kill its wpa_supplicant daemon too and exit this script:
+if [ "$2" = "stop" ]; then
+	pkill --full "bin/wpa_supplicant.* -i${INTERFACE}"
+	return 0
+fi
+
+# -----------------------------------------------------
+# Continue with the script - bringing the interface UP.
+# -----------------------------------------------------
+
+# Bring interface up - for determining the HWADDR
+$IFCOMMAND up
+sleep 3
+
+# Get the MAC address for the interface
+HWADDR=$(cat "/sys/class/net/${INTERFACE}/address")
+
+# Empty all wireless parameters- some of them could still be set for a previous interface:
+# when rc.inet1 is sourced from rc.M all scripts are run in the same shell.
+CHANNEL=""
+ESSID=""
+FREQ=""
+FRAG=""
+IWCONFIG=""
+IWPRIV=""
+IWSPY=""
+KEY=""
+MODE=""
+NICKNAME=""
+NWID=""
+RATE=""
+RTS=""
+SENS=""
+WPA=""
+WPADRIVER=""
+WPACONF=""
+WPAWAIT=""
+# Read the configuration information for the card with address $HWADDR
+# from /etc/rc.d/rc.wireless.conf:
+[[ -r /etc/rc.d/rc.wireless.conf ]] && . /etc/rc.d/rc.wireless.conf
+
+# Let any per-interface overrides (the WLAN_xxxx parameters) that are set
+# in /etc/rc.d/rc.inet1.conf have precedence.
+# The reason: you might have multiple wireless cards of the same brand, or
+# connecting to multiple networks.
+# Position 'i' of this interface in the IFNAME array was determined in rc.inet1
+CHANNEL=${WLAN_CHANNEL[$i]:-${CHANNEL}}
+ESSID=${WLAN_ESSID[$i]:-${ESSID}}
+FREQ=${WLAN_FREQ[$i]:-${FREQ}}
+FRAG=${WLAN_FRAG[$i]:-${FRAG}}
+IWCONFIG=${WLAN_IWCONFIG[$i]:-${IWCONFIG}}
+IWPRIV=${WLAN_IWPRIV[$i]:-${IWPRIV}}
+IWSPY=${WLAN_IWSPY[$i]:-${IWSPY}}
+KEY=${WLAN_KEY[$i]:-${KEY}}
+MODE=${WLAN_MODE[$i]:-${MODE}}
+NICKNAME=${WLAN_NICKNAME[$i]:-${NICKNAME}}
+NWID=${WLAN_NWID[$i]:-${NWID}}
+RATE=${WLAN_RATE[$i]:-${RATE}}
+RTS=${WLAN_RTS[$i]:-${RTS}}
+SENS=${WLAN_SENS[$i]:-${SENS}}
+WPA=${WLAN_WPA[$i]:-${WPA}}
+# The "ext" interface will be default if not explicitly set
+WPADRIVER=${WLAN_WPADRIVER[$i]:-${WPADRIVER:="wext"}}
+# The default config file as installed by the wpa_supplicant package:
+WPACONF=${WLAN_WPACONF[$i]:-${WPACONF:="/etc/wpa_supplicant.conf"}}
+WPAWAIT=${WLAN_WPAWAIT[$i]:-${WPAWAIT:="60"}}
+
+
+[ -n "$VERBOSE" ] && [ -n "$INFO" ] && echo "$0:  $1 information: '$INFO'"
+
+###################
+# WIRELESS CONFIG #
+###################
+
+# Mode needs to be first : some settings apply only in a specific mode!
+if [ -n "$MODE" ] ; then
+	echo "$0:  $IWCOMMAND mode $MODE" | $LOGGER
+        # if $IWCOMMAND fails, try taking the interface down to run it.
+        # Some drivers require this.
+	if ! $IWCOMMAND mode $MODE 2> /dev/null ; then
+		$IFCOMMAND down
+		$IWCOMMAND mode $MODE
+		$IFCOMMAND up
+		sleep 3
+        fi
+fi
+# This is a bit hackish, but should do the job right...
+if [ ! -n "$NICKNAME" ] ; then
+    NICKNAME=$(/bin/hostname)
+fi
+if [ -n "$ESSID" ] || [ -n "$MODE" ] ; then
+	echo "$0:  $IWCOMMAND nick $NICKNAME" | $LOGGER
+	$IWCOMMAND nick $NICKNAME
+fi
+# Regular stuff...
+if [ -n "$NWID" ] ; then
+	echo "$0:  $IWCOMMAND nwid $NWID" | $LOGGER
+	$IWCOMMAND nwid $NWID
+fi
+if [ -n "$FREQ" ] ; then
+	echo "$0:  $IWCOMMAND freq $FREQ" | $LOGGER
+	$IWCOMMAND freq $FREQ
+elif [ -n "$CHANNEL" ] ; then
+	echo "$0:  $IWCOMMAND channel $CHANNEL" | $LOGGER
+	$IWCOMMAND channel $CHANNEL
+fi
+
+# WEP keys (non-WPA) 
+if [ -n "$KEY" ] && [ ! -n "$WPA" ] ; then
+	if [ "$KEY" = "off" ]; then
+	  echo "$0:  $IWCOMMAND key open" | $LOGGER
+	  $IWCOMMAND key open
+	  echo "$0:  $IWCOMMAND key off" | $LOGGER
+	  $IWCOMMAND key off
+	else 
+	  echo "$0:  $IWCOMMAND key ************" | $LOGGER
+	  $IWCOMMAND key $KEY
+	  if ! echo "$KEY" | egrep -qw "restricted|open" ; then
+	    # Set "restricted" as the default security mode:
+	    echo "$0:  $IWCOMMAND key restricted" | $LOGGER
+	    $IWCOMMAND key restricted
+	  fi
+	fi
+fi
+if [ -n "$SENS" ] ; then
+	echo "$0:  $IWCOMMAND sens $SENS" | $LOGGER
+	$IWCOMMAND sens $SENS
+fi
+if [ -n "$RATE" ] ; then
+	echo "$0:  $IWCOMMAND rate $RATE" | $LOGGER
+	$IWCOMMAND rate $RATE
+fi
+if [ -n "$RTS" ] ; then
+	echo "$0:  $IWCOMMAND rts $RTS" | $LOGGER
+	$IWCOMMAND rts $RTS
+fi
+if [ -n "$FRAG" ] ; then
+	echo "$0:  $IWCOMMAND frag $FRAG" | $LOGGER
+	$IWCOMMAND frag $FRAG
+fi
+# More specific parameters
+if [ -n "$IWCONFIG" ] ; then
+	echo "$0:  $IWCOMMAND $IWCONFIG" | $LOGGER
+	$IWCOMMAND $IWCONFIG
+fi
+if [ -n "$IWSPY" ] ; then
+	echo "$0:  $IWSPYCMD $IWSPY" | $LOGGER
+	$IWSPYCMD $IWSPY
+fi
+# For RaLink cards, the SSID must be set right before configuring WPAPSK/TKIP parameters
+# using iwpriv commands in order to generate the wpapsk password. This should not hurt other cards:
+if [ -n "$ESSID" ] ; then
+  echo "$0:  $IWCOMMAND essid \"$ESSID\"" | $LOGGER
+  $IWCOMMAND essid "$ESSID"
+fi
+# The iwpriv can set one private IOCTL at the time, so if the $IWPRIV
+# variable contains multiple pipe ('|') separated settings, we split them here:
+# WARNING: if your iwpriv commands contain a WEP/WPA key, these can be logged
+# in /var/log/messages!
+if [ -n "$IWPRIV" ] ; then
+  echo "${IWPRIV}|" | \
+  while read -d '|' iwi; do
+    if [ -n "$iwi" ]; then
+      echo "$0:  $IWPRIVCMD $iwi" | $LOGGER
+      $IWPRIVCMD $iwi
+    fi
+  done
+fi
+
+##################
+# WPA_SUPPLICANT #
+##################
+
+# Support for WPA (wireless protected access) is provided by wpa_supplicant
+# for those drivers that support it (and it looks like wpa_supplicant is
+# the future for WPA support in Linux anyway)
+if [ "$WPA" = "wpa_supplicant" ] || [ "$WPA" = "wpaxsupplicant" ] && [ -x ${SUPPATH}/wpa_supplicant ]; then
+	# Interface down, so wpa_supplicant can associate with the AP
+	$IFCOMMAND down
+	#WPACONF=${WPACONF:-/etc/wpa_supplicant.conf}
+	WPA_OPTIONS=""
+	[ -n "$WPADRIVER" ] && WPA_OPTIONS="-D${WPADRIVER}" # specify the driver
+	[ "$WPA" = "wpaxsupplicant" ] && WPA_OPTIONS="${WPA_OPTIONS} -e" # Use external xsupplicant (disables the internal supplicant)
+
+	# We leave a running wpa_supplicant process in peace:
+	if pgrep --full "bin/wpa_supplicant.* -i${INTERFACE}" >/dev/null ; then
+	  echo "$0:  wpa_supplicant found running already" | $LOGGER
+	else
+	  echo "$0:  wpa_supplicant -B -c${WPACONF} ${WPA_OPTIONS} -i$INTERFACE" | $LOGGER
+	  ${SUPPATH}/wpa_supplicant -B -c${WPACONF} ${WPA_OPTIONS} -i$INTERFACE
+	fi
+
+	# Buy wpa_supplicant some time to authenticate before bringing the
+	# interface back up... but we don't wait forever:
+	# You can increase this value in rc.inet1.conf (WLAN_WPAWAIT) or rc.wireless.conf (WPAWAIT)
+        # if your card takes longer to associate:
+	WPAWAIT=${WPAWAIT:-10}
+	wi=0
+	while [ $wi -lt $WPAWAIT ]; do
+	  wi=$(($wi+1)); sleep 1
+	  if (grep -q "^ctrl_interface=" ${WPACONF}); then
+	    if (LC_ALL=C ${SUPPATH}/wpa_cli -i$INTERFACE status | grep -q "^wpa_state=COMPLETED"); then break; fi
+	  else
+	    if (LC_ALL=C ${IWCOMMAND} | grep -Eq "Encryption key:....-"); then break; fi
+	  fi
+	done
+	if [ $wi -eq $WPAWAIT ]; then
+	  echo "$0:  WPA authentication did not complete, try running '/etc/rc.d/rc.inet1 ${INTERFACE}_start' in a few seconds." | $LOGGER
+	fi
+	# Bring interface up to avoid 'not ready' errors when calling iwconfig
+        # Update 09/Mar/21: No point bringing it up here to be taken down at exit.
+	# $IFCOMMAND up
+	# sleep 3
+else
+	# ESSID need to be last: most devices re-perform the scanning/discovery
+	# when this is set, and things like encryption keys had better be
+	# defined if we want to discover the right set of APs/nodes.
+	# NOTE: when automatic association does not work, but you manage to get
+	# an IP address by manually setting the ESSID and then calling dhcpcd,
+	# then the cause might be the incorrect definition of your ESSID="bla"
+	# parameter in rc.wireless.conf.
+	# Debug your wireless problems by running 'iwevent' while the card
+	# is being configured.
+	if [ -n "$ESSID" ] ; then
+	  echo "$0:  $IWCOMMAND essid \"$ESSID\"" | $LOGGER
+	  $IWCOMMAND essid "$ESSID"
+	fi
+fi
+$IFCOMMAND down
+sleep 3
Index: rc.wireless.conf
===================================================================
--- rc.wireless.conf	(nonexistent)
+++ rc.wireless.conf	(revision 5)
@@ -0,0 +1,226 @@
+# Wireless LAN adapter configuration
+#
+# Theory of operation :
+#
+# The script attempts to match a block of settings to the specific wireless
+# card inserted, the *first* block matching the card is used.
+# The address format is "hwaddr", with * as a wildcard.
+# 'hwaddr' is the unique MAC address identifier of the wireless card.
+# The MAC address is usually printed on the card, or can be found via 
+# "/sbin/ip link show dev $interface"
+# Some examples here use only half of the MAC address with a wildcard to
+# match a whole family of cards...
+#
+# All the Wireless specific configuration is done through the Wireless
+# Extensions, so we will just call 'iwconfig' with the right parameters
+# defined below.
+# Of course, you need to have iwconfig installled on your system.
+# To download iwconfig, or for more info on Wireless Extensions :
+#    http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
+#
+# Note : you don't need to fill all parameters, leave them blank, in most
+# cases the driver will initialise itself with sane defaults values or
+# automatically figure out the value... And no drivers do support all
+# possible settings...
+#
+# -- This is a modified '/etc/pcmcia/wireless.opts' script --
+# -- I added sections for Prism/GT and Atheros based cards --
+# --    (supported by the prism54 and madwifi drivers)     --
+# --              16/sep/2004 * Eric Hameleers             --
+#
+
+VERBOSE=1
+
+case "$HWADDR" in
+
+## NOTE : Comment out the following five lines to activate the samples below ...
+## --------- START SECTION TO REMOVE -----------
+## Pick up any Access Point, should work on most 802.11 cards
+*)
+    INFO="Any ESSID"
+    ESSID="any"
+    ;;
+## ---------- END SECTION TO REMOVE ------------
+
+
+# Here are a few examples with a few Wireless LANs supported...
+# The matching is done on the first 3 bytes of the MAC address
+
+# SMC2835W EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Adapter 
+00:04:E2:*)
+    INFO="SMC2835W EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Adapter"
+    # ESSID (extended network name) : My Network, any
+    ESSID="any"
+    # NWID/Domain (cell identifier) : 89AB, 100, off
+    NWID=""
+    # Operation mode : Ad-Hoc, Managed, Master, Repeater, Secondary, auto
+    MODE="Managed"
+    # Frequency or channel : 1, 2, 3 (channel) ; 2.422G, 2.46G (frequency)
+    FREQ=""
+    CHANNEL="7"
+    # Sensitivity (cell size + roaming speed) : 1, 2, 3 ; -70 (dBm)
+    SENS=""
+    # Bit rate : auto, 1M, 11M,54M
+    RATE="auto"
+    # Encryption key : 4567-89AB-CD, s:password
+    # Example for 40-bit encryption:
+    #KEY="883e-aa67-21 [1] key 5501-d0da-87 [2] key 91f5-3368-6b [3] key 2d73-31b7-96 [4]"
+    # Example for 104-bit encryption (aka 128-bit WEP):
+    #KEY="d5ad2f05abd048ecf10b1c80c7"
+    KEY=""
+    # RTS threshold : off, 500
+    RTS=""
+    # Fragmentation threshold : off, 1000
+    FRAG=""
+    # Other iwconfig parameters : power off, ap 01:23:45:67:89:AB
+    IWCONFIG=""
+    # iwspy parameters : + 01:23:45:67:89:AB
+    IWSPY=""
+    # iwpriv parameters : set_port 2, set_histo 50 60
+    IWPRIV=""
+;;
+
+# Multiband Atheros based 802.11a/b/g universal NIC cards
+00:05:4E:*)
+    INFO="Multiband Atheros based 802.11a/b/g universal NIC"
+    # ESSID (extended network name) : My Network, any
+    ESSID=""
+    # Operation mode : Ad-Hoc, Managed, Master, Repeater, Secondary, auto
+    MODE="Managed"
+    # Frequency or channel : 1, 2, 3 (channel) ; 2.422G, 2.46G (frequency)
+    FREQ=""
+    CHANNEL="7"
+    # Bit rate : auto, 1M, 11M,54M
+    RATE="auto"
+    # Encryption key : 4567-89AB-CD, s:password
+    # Example for 40-bit encryption:
+    #KEY="883e-aa67-21 [1] key 5501-d0da-87 [2] key 91f5-3368-6b [3] key 2d73-31b7-96 [4]"
+    # Example for 104-bit encryption (aka 128-bit WEP):
+    #KEY="d5ad2f05abd048ecf10b1c80c7"
+    KEY=""
+    # Other iwconfig parameters : power off, ap 01:23:45:67:89:AB
+    IWCONFIG=""
+    # iwspy parameters : + 01:23:45:67:89:AB
+    IWSPY=""
+    # iwpriv parameters : set_port 2, set_histo 50 60
+    IWPRIV=""
+    ;;
+
+# Lucent Wavelan IEEE (+ Orinoco, RoamAbout and ELSA)
+# Note : wvlan_cs driver only, and version 1.0.4+ for encryption support
+00:60:1D:*|00:02:2D:*)
+    INFO="Wavelan IEEE example (Lucent default settings)"
+    ESSID="Wavelan Network"
+    MODE="Managed"
+    #RATE="auto"
+    KEY="s:secu1"
+    # To set all four keys, use :
+    #KEY="s:secu1 [1] key s:secu2 [2] key s:secu3 [3] key s:secu4 [4] key [1]"
+    # For the RG 1000 Residential Gateway: The ESSID is the identifier on
+    # the unit, and the default key is the last 5 digits of the same.
+    #ESSID="084d70"
+    #KEY="s:84d70"
+    ;;
+
+# Cisco/Aironet 4800/3x0
+# Note : MPL driver only (airo/airo_cs), version 1.3 or later
+00:40:96:*|00:02:8A:*)
+    INFO="Cisco/Aironet example (Cisco default settings)"
+    ESSID="any"
+    # To set all four ESSID, use iwconfig v21 and the same trick as above
+    MODE="Managed"
+    #RATE="11M auto"
+    #KEY="d5ad2f05abd048ecf10b1c80c7"
+    KEY="off"
+    ;;
+
+# Samsung MagicLan (+ some other PrismII cards)
+# Note : Samsung binary library driver, version 1.20 or later
+00:00:F0:*|00:02:78:*)
+    INFO="Samsung MagicLan example (Samsung default settings)"
+    ESSID="any"
+    MODE="Managed"
+    CHANNEL="4"
+    RATE="auto"
+    #KEY="883e-aa67-21 [1] key 5501-d0da-87 [2] key 91f5-3368-6b [3] key 2d73-31b7-96 [4]"
+    #IWCONFIG="power on"
+    ;;
+
+# Raytheon Raylink/WebGear Aviator2.4
+# Note : doesn't work yet, please use for debugging only :-(
+00:00:8F:*|00:00:F1:*)
+    INFO="Raylink/Aviator2.4 example (Aviator default ad-hoc setting)"
+    ESSID="ADHOC_ESSID"
+    MODE="Ad-Hoc"
+    RATE="auto"
+    IWPRIV="set_framing 1"
+    ;;
+
+# Old Lucent Wavelan
+08:00:0E:*)
+    INFO="Wavelan example (Lucent default settings)"
+    NWID="0100"
+    MODE="Ad-Hoc"
+    FREQ="2.425G"
+    KEY="off"
+    ;;
+
+# Netwave (Xircom Netwave/Netwave Airsurfer)
+00:80:C7:*)
+    INFO="Netwave example (Netwave default settings)"
+    NWID="100"
+    KEY="00"
+    ;;
+
+# Proxim RangeLan2/Symphony (what is the MAC address ???)
+XX:XX:XX:*)
+    INFO="Proxim RangeLan2/Symphony example"
+    NWID="0"
+    MODE="Master"
+    CHANNEL="15"
+    IWPRIV="setsubchan 1"
+    ;;
+
+# No Wires Needed Swallow 550 and 1100 setting (what is the MAC address ???)
+XX:XX:XX:*)
+    INFO="NWN Swallow example"
+    ESSID="session"
+    KEY="0000-0000-00 open"
+    ;;
+
+# Symbol Spectrum24 setting (what is the MAC address ???)
+XX:XX:XX:*)
+    INFO="Symbol Spectrum24 example"
+    ESSID="Essid string"
+    ;;
+
+# Generic example (decribe all possible settings)
+*)
+    INFO="Fill with your own settings..."
+    # ESSID (extended network name) : My Network, any
+    ESSID=""
+    # NWID/Domain (cell identifier) : 89AB, 100, off
+    NWID=""
+    # Operation mode : Ad-Hoc, Managed, Master, Repeater, Secondary, auto
+    MODE=""
+    # Frequency or channel : 1, 2, 3 (channel) ; 2.422G, 2.46G (frequency)
+    FREQ=""
+    CHANNEL=""
+    # Sensitivity (cell size + roaming speed) : 1, 2, 3 ; -70 (dBm)
+    SENS=""
+    # Bit rate : auto, 1M, 11M
+    RATE=""
+    # Encryption key : 4567-89AB-CD, s:password
+    KEY=""
+    # RTS threshold : off, 500
+    RTS=""
+    # Fragmentation threshold : off, 1000
+    FRAG=""
+    # Other iwconfig parameters : power off, ap 01:23:45:67:89:AB
+    IWCONFIG=""
+    # iwspy parameters : + 01:23:45:67:89:AB
+    IWSPY=""
+    # iwpriv parameters : set_port 2, set_histo 50 60
+    IWPRIV=""
+    ;;
+esac
Index: .
===================================================================
--- .	(nonexistent)
+++ .	(revision 5)

Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~