From: Roy Marples Date: Tue, 14 Jun 2011 06:17:40 +0000 (+0000) Subject: Detect ntp.conf exists before copying. X-Git-Tag: v5.5.0~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e015c2f96c50c6df05a4f6cd06c25c468520c9ac;p=thirdparty%2Fdhcpcd.git Detect ntp.conf exists before copying. Fixes Debian #630420 --- diff --git a/dhcpcd-hooks/50-ntp.conf b/dhcpcd-hooks/50-ntp.conf index 528ac872..aeb02688 100644 --- a/dhcpcd-hooks/50-ntp.conf +++ b/dhcpcd-hooks/50-ntp.conf @@ -50,7 +50,7 @@ build_ntp_conf() [ -d "$ntp_conf_dir" ] || mkdir -p "$ntp_conf_dir" if [ -n "$NTP_DHCP_CONF" ]; then - cp "$ntp_conf" "$cf" + [ -e "$ntp_conf" ] && cp "$ntp_conf" "$cf" ntp_conf="$NTP_DHCP_CONF" elif [ -e "$ntp_conf" ]; then remove_markers "$signature_base" "$signature_base_end" \