FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 06-30-2010, 09:47 PM
Victor Lowther
 
Default Start tightening up rc.sysinit.

---
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
 

Thread Tools




All times are GMT. The time now is 01:07 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org