summaryrefslogtreecommitdiffstats
path: root/sbin/init.d/ntp
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2006-07-16 15:09:47 +0200
committerWilly Tarreau <willy@wtap.(none)>2006-07-26 12:03:28 +0200
commit0bf1a7d9bc662b05a784e6bc39a7e4707107d4d4 (patch)
treeaab4d912d17c9c1cebc06298dd15a60c404cc953 /sbin/init.d/ntp
parent[RELEASE] init-scripts-0.3.9 (diff)
downloadinit-scripts-0.3.10.tar.gz
[RELEASE] init-scripts-0.3.10v0.3.10
Diffstat (limited to 'sbin/init.d/ntp')
-rwxr-xr-xsbin/init.d/ntp5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/init.d/ntp b/sbin/init.d/ntp
index c654485..3d18789 100755
--- a/sbin/init.d/ntp
+++ b/sbin/init.d/ntp
@@ -26,8 +26,8 @@ function fct_pre_start {
local driftfile
valueof $opt_config driftfile > /dev/null 2>&1 ; driftfile=$REPLY
- if [ ! -e $( dirname $driftfile ) ] ; then
- mkdir -p $(dirname $driftfile)
+ if [ -n "$driftfile" -a ! -e "${driftfile%/*}" ] ; then
+ mkdir -p ${driftfile%/*}
fi
if [ "$opt_force_sync" = "1" -a "$opt_sync_servers" ]; then
ntpdate -u -t 2 $opt_sync_servers
@@ -53,3 +53,4 @@ function do_update {
}
load_config
+