[PATCH 27/48] Start tightening up rc.sysinit.

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



---
 rc.sysinit |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/rc.sysinit b/rc.sysinit
index c62ae8d..29adeca 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -17,12 +17,9 @@ printsep
 run_hook sysinit_start
 
 # mount /proc, /sys and our RAM /dev
-if ! /bin/mountpoint -q /proc; then
-  /bin/mount -n -t proc none /proc
-fi
-if ! /bin/mountpoint -q /sys; then
-  /bin/mount -n -t sysfs none /sys
-fi
+/bin/mountpoint -q /proc || /bin/mount -n -t proc none /proc
+/bin/mountpoint -q /sys  || /bin/mount -n -t sysfs none /sys
+
 if ! /bin/mountpoint -q /dev; then
   if grep -q devtmpfs /proc/filesystems 2>/dev/null; then
     /bin/mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid
@@ -46,13 +43,11 @@ else
 fi
 
 HWCLOCK_PARAMS="--hctosys"
-if [ "$HARDWARECLOCK" = "UTC" ]; then
-	HWCLOCK_PARAMS="$HWCLOCK_PARAMS --utc"
-elif [ "$HARDWARECLOCK" = "localtime" ]; then
-	HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime"
-else
-	HWCLOCK_PARAMS=""
-fi
+case $HARDWARECLOCK in
+    UTC) "$HWCLOCK_PARAMS --utc";;
+    localtime) HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime";;
+    *) HWCLOCK_PARAMS="";;
+esac
 
 if [ -n "$HWCLOCK_PARAMS" ]; then
 	# enable rtc access
-- 
1.7.1



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux