summaryrefslogtreecommitdiff
path: root/scripts/rl-system.init
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-12-01 10:34:11 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-12-01 10:34:11 -0800
commite7b88b1b1a9a89f3e7cc36ea321e789d0365e4d8 (patch)
tree8979e9ab31aec73d67a5a5b33ef1c4226b207506 /scripts/rl-system.init
parentb30840e1b9f31143ab50be9ed255ceaca94dbc39 (diff)
downloadvyatta-cfg-system-e7b88b1b1a9a89f3e7cc36ea321e789d0365e4d8.tar.gz
vyatta-cfg-system-e7b88b1b1a9a89f3e7cc36ea321e789d0365e4d8.zip
Avoid updating files on boot
If file is already correct, no need to write it.
Diffstat (limited to 'scripts/rl-system.init')
-rwxr-xr-xscripts/rl-system.init9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/rl-system.init b/scripts/rl-system.init
index 0eaf6a65..b2012211 100755
--- a/scripts/rl-system.init
+++ b/scripts/rl-system.init
@@ -87,7 +87,7 @@ add_new_serial_if () {
## Update the version information
update_version_info () {
if [ -f ${vyatta_sysconfdir}/version.master ]; then
- cp ${vyatta_sysconfdir}/version.master ${vyatta_sysconfdir}/version
+ cp -u ${vyatta_sysconfdir}/version.master ${vyatta_sysconfdir}/version
fi
}
@@ -96,7 +96,7 @@ clear_or_override_config_files ()
for conf in snmp/snmpd.conf snmp/snmptrapd.conf keepalived/keepalived.conf \
ipvsadm.rules default/ipvsadm resolv.conf
do
- if [ -f /etc/$conf ] ; then
+ if [ -s /etc/$conf ] ; then
empty /etc/$conf
fi
done
@@ -172,7 +172,10 @@ setup_ntp_config_file () {
# restore PAM back to virgin state (no radius other services)
pam_reset () {
- DEBIAN_FRONTEND=noninteractive pam-auth-update --force --remove radius
+ if grep -q radius /etc/pam.d/common-auth
+ then DEBIAN_FRONTEND=noninteractive \
+ pam-auth-update --force --remove radius
+ fi
}
start () {