summaryrefslogtreecommitdiff
path: root/source/a/sysvinit-scripts/scripts/rc.S
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2012-09-26 01:10:42 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:51:55 +0200
commit9664bee729d487bcc0a0bc35859f8e13d5421c75 (patch)
treeb428a16618e36ed864a8d76ea3435e19a452bf90 /source/a/sysvinit-scripts/scripts/rc.S
parent75a4a592e5ccda30715f93563d741b83e0dcf39e (diff)
downloadcurrent-9664bee729d487bcc0a0bc35859f8e13d5421c75.tar.gz
Slackware 14.0slackware-14.0
Wed Sep 26 01:10:42 UTC 2012 Slackware 14.0 x86_64 stable is released! We're perfectionists here at Slackware, so this release has been a long time a-brewing. But we think you'll agree that it was worth the wait. Slackware 14.0 combines modern components, ease of use, and flexible configuration... our "KISS" philosophy demands it. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Thanks to everyone who helped make this happen. The Slackware team, the upstream developers, and (of course) the awesome Slackware user community. Have fun! :-)
Diffstat (limited to 'source/a/sysvinit-scripts/scripts/rc.S')
-rw-r--r--source/a/sysvinit-scripts/scripts/rc.S50
1 files changed, 25 insertions, 25 deletions
diff --git a/source/a/sysvinit-scripts/scripts/rc.S b/source/a/sysvinit-scripts/scripts/rc.S
index c02f1e27..97ff7be4 100644
--- a/source/a/sysvinit-scripts/scripts/rc.S
+++ b/source/a/sysvinit-scripts/scripts/rc.S
@@ -19,21 +19,27 @@ if [ -d /sys ]; then
fi
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
+ fi
+fi
+
# Load the loop device kernel module:
if [ -x /etc/rc.d/rc.loop ]; then
. /etc/rc.d/rc.loop start
fi
-# Initialize udev to manage /dev entries and hotplugging for 2.6.x kernels.
+# 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 in the 2.6.x+ kernels udev
-# has taken over the job of hotplug (finding hardware and loading the kernel
-# modules for it, as well as creating device nodes in /dev). 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 with a 2.6 kernel. So use it. :-)
+# 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 tmpfs /proc/filesystems ; then
if ! grep -wq nohotplug /proc/cmdline ; then
if [ -x /etc/rc.d/rc.udev ]; then
@@ -103,10 +109,7 @@ if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then
echo "${PASS}" | /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS
fi
else
- for i in seq 1 3 ; do
- /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS </dev/tty0 >/dev/tty0 2>&1
- [ $? -eq 0 ] && break
- done
+ /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,
@@ -134,12 +137,13 @@ if [ -x /sbin/hwclock ]; then
CLOCK_OPT="--directisa"
fi
if grep -wq "^UTC" /etc/hardwareclock ; then
- echo "Setting system time from the hardware clock (UTC)."
+ echo -n "Setting system time from the hardware clock (UTC): "
/sbin/hwclock $CLOCK_OPT --utc --hctosys
else
- echo "Setting system time from the hardware clock (localtime)."
+ echo -n "Setting system time from the hardware clock (localtime): "
/sbin/hwclock $CLOCK_OPT --localtime --hctosys
fi
+ date
fi
# Test to see if the root partition is read-only, like it ought to be.
@@ -250,18 +254,14 @@ else
read junk;
fi # Done checking root filesystem
-# Any /etc/mtab that exists here is old, so we delete it to start over:
-/bin/rm -f /etc/mtab*
-# Remounting the / partition will initialize the new /etc/mtab:
-/sbin/mount -w -o remount /
-# Read in the correct / filesystem complete with arguments so mount will
-# show them correctly. This does not stop those arguments from functioning
-# but does prevent a small bug with /etc/mtab.
-/bin/grep ' / ' /proc/mounts | grep -v "^rootfs" > /etc/mtab
+# 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 entry for / to /etc/mtab:
+/sbin/mount -f -w /
-# Fix /etc/mtab to list sys and proc if they were not yet entered in
-# /etc/mtab because / was still mounted read-only:
+# Add /proc and /sys mounts to /etc/mtab:
if [ -d /proc/sys ]; then
/sbin/mount -f proc /proc -t proc
fi