summaryrefslogtreecommitdiffstats
path: root/sbin/init.d/system
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2006-07-16 15:09:55 +0200
committerWilly Tarreau <willy@wtap.(none)>2006-07-26 12:03:42 +0200
commit9a62ca7403c34dabcce7d0f6babe6f92b07c7a5c (patch)
treec23a9de35d39482a43f7c2366c9190c6b438952f /sbin/init.d/system
parent[RELEASE] init-scripts-0.3.20 (diff)
downloadinit-scripts-0.3.21.tar.gz
[RELEASE] init-scripts-0.3.21v0.3.21
Diffstat (limited to 'sbin/init.d/system')
-rwxr-xr-xsbin/init.d/system14
1 files changed, 11 insertions, 3 deletions
diff --git a/sbin/init.d/system b/sbin/init.d/system
index f18aa42..fac0bc3 100755
--- a/sbin/init.d/system
+++ b/sbin/init.d/system
@@ -6,12 +6,14 @@ option hostname standard_option
option modprobe multiple_option
option sysctl multiple_option
option file_max standard_option
-option rtc standard_option "local"
+option rtc standard_option "local" # "local", "utc", "disabled"
+option rtc_mode standard_option "direct" # "direct", "kernel"
function do_start {
local svcname=$1
local instname=$2
local arg
+ local rtc_opt=""
arg=0
while [ $arg -lt ${#opt_modprobe[*]} ]; do
@@ -29,15 +31,21 @@ function do_start {
echo ${opt_hostname#*.} >/proc/sys/kernel/domainname
fi
+ # this is necessary because some PCs (eg: siemens) hang otherwise.
+ if [ "$opt_rtc_mode" = "direct" ]; then
+ rtc_opt="$rtc_opt --directisa"
+ fi
+
if [ "$opt_rtc" = "utc" ]; then
echo -n "Setting system time from hardware clock (UTC)... "
- hwclock --hctosys --utc
+ hwclock --hctosys --utc $rtc_opt
echo "Done."
elif [ "$opt_rtc" = "local" ]; then
echo -n "Setting system time from hardware clock (Local time)... "
- hwclock --hctosys --localtime
+ hwclock --hctosys --localtime $rtc_opt
echo "Done."
fi
+
for arg in ${opt_sysctl[*]}; do
local sysctl value
sysctl=${arg%%=*}