From: Roy Marples Date: Wed, 8 Jul 2009 17:05:29 +0000 (+0000) Subject: Ensure that ntp.conf exists before removing markers. X-Git-Tag: v5.0.6~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=975b7b49bb65b6a50d4e6dbe951bec831fc91d6b;p=thirdparty%2Fdhcpcd.git Ensure that ntp.conf exists before removing markers. --- diff --git a/dhcpcd-hooks/50-ntp.conf b/dhcpcd-hooks/50-ntp.conf index b88553f0..8fad6df5 100644 --- a/dhcpcd-hooks/50-ntp.conf +++ b/dhcpcd-hooks/50-ntp.conf @@ -48,8 +48,10 @@ build_ntp_conf() # Merge our config into ntp.conf [ -e "$cf" ] && rm -f "$cf" [ -d "$ntp_conf_dir" ] || mkdir -p "$ntp_conf_dir" - remove_markers "$signature_base" "$signature_base_end" \ - "$ntp_conf" > "$cf" + if [ -e "$ntp_conf" ]; then + remove_markers "$signature_base" "$signature_base_end" \ + "$ntp_conf" > "$cf" + fi if [ -n "$servers" ]; then echo "$signature_base${header:+ $from }$header" >> "$cf" printf "$search$servers" >> "$cf"