summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2009-05-30 12:55:14 -0700
committerStig Thormodsrud <stig@vyatta.com>2009-05-30 12:55:14 -0700
commit6052886a6a06f8ef6ee0a35f3c9bb47d81e5d755 (patch)
treed2637a32a63cfdbbc813e92e25f16f51e0476dd2
parentab857f46cb19f9acdc53afb496ce6a13f3636b2f (diff)
parent78aef156293581ce5028ff22d752241cc2e9525b (diff)
downloadvyatta-cfg-quagga-6052886a6a06f8ef6ee0a35f3c9bb47d81e5d755.tar.gz
vyatta-cfg-quagga-6052886a6a06f8ef6ee0a35f3c9bb47d81e5d755.zip
Merge branch 'jenner' of http://git.vyatta.com/vyatta-cfg-system into jenner
-rw-r--r--debian/changelog20
-rw-r--r--debian/vyatta-cfg-system.postinst.in5
-rw-r--r--scripts/dynamic-dns/vyatta-dynamic-dns.pl4
-rwxr-xr-xscripts/system/vyatta_update_login.pl6
-rw-r--r--templates/system/ntp-server/node.def24
5 files changed, 39 insertions, 20 deletions
diff --git a/debian/changelog b/debian/changelog
index 339ab6a3..b7dc5875 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,23 @@
+vyatta-cfg-system (0.15.48+jenner1) unstable; urgency=low
+
+ [ Stephen Hemminger ]
+ * Print error message on failure to create group/user
+
+ [ Mohit Mehta ]
+ * move server,protocol to the same line in config file
+
+ [ An-Cheng Huang ]
+
+ -- An-Cheng Huang <ancheng@vyatta.com> Fri, 29 May 2009 18:31:07 -0700
+
+vyatta-cfg-system (0.15.48) unstable; urgency=low
+
+ * Restore default facility for 'syslog console'
+ * Revert "Restore default facility for 'syslog console'"
+ * NTP management version 3
+
+ -- Stephen Hemminger <stephen.hemminger@vyatta.com> Wed, 27 May 2009 10:12:45 -0700
+
vyatta-cfg-system (0.15.47) unstable; urgency=low
[ Jon Andersson ]
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in
index 57f4b043..ec159432 100644
--- a/debian/vyatta-cfg-system.postinst.in
+++ b/debian/vyatta-cfg-system.postinst.in
@@ -7,13 +7,10 @@ bindir=@bindir@
sbindir=@sbindir@
# remove init of daemons that we start/stop
-for init in ssh snmpd openhpid vyatta-keepalived ipvsadm dnsmasq ddclient; do
+for init in ntp ssh snmpd openhpid vyatta-keepalived ipvsadm dnsmasq ddclient; do
update-rc.d -f ${init} remove >/dev/null
done
-# for upgrade make sure ntp is run during boot
-update-rc.d ntp defaults
-
# remove extra call to clock setup only need one. this speeds up boot
# Mystery: why does Debian do it twice?
if [ -L /etc/rcS.d/S08hwclockfirst.sh -a -L /etc/rcS.d/S11hwclock.sh ]; then
diff --git a/scripts/dynamic-dns/vyatta-dynamic-dns.pl b/scripts/dynamic-dns/vyatta-dynamic-dns.pl
index 1d8511c5..232d260e 100644
--- a/scripts/dynamic-dns/vyatta-dynamic-dns.pl
+++ b/scripts/dynamic-dns/vyatta-dynamic-dns.pl
@@ -126,10 +126,8 @@ sub dynamicdns_get_values {
my @hostnames = $config->returnValues("host-name");
my $server = $config->returnValue("server");
foreach my $hostname (@hostnames) {
+ $output .= "server=$server," if defined $server;
$output .= "protocol=$service\n";
- if (defined $server) {
- $output .= "server=$server\n";
- }
$output .= "max-interval=28d\n";
$output .= "login=$login\n";
$output .= "password='$password'\n";
diff --git a/scripts/system/vyatta_update_login.pl b/scripts/system/vyatta_update_login.pl
index d482c297..c8d0a23a 100755
--- a/scripts/system/vyatta_update_login.pl
+++ b/scripts/system/vyatta_update_login.pl
@@ -120,8 +120,10 @@ for my $user (@user_keys) {
$cmd .= " -c \"$fname\"" if ( defined $fname );
$cmd .= " -d \"$home\"" if ( defined $home );
$cmd .= ' -G ' . join( ',', @groups );
- system("sudo $cmd $user") == 0
- or die "sudo $cmd $user failed: $?";
+ system("sudo $cmd $user");
+ return if ($? == 0);
+ my $reason = $reasons{($? >> 8)};
+ die "Attempt to change user $user failed: $reason\n";
}
}
diff --git a/templates/system/ntp-server/node.def b/templates/system/ntp-server/node.def
index f1318b28..c8e3a9f2 100644
--- a/templates/system/ntp-server/node.def
+++ b/templates/system/ntp-server/node.def
@@ -1,15 +1,17 @@
multi:
type: txt
help: Set name or IP address of Network Time Protocol (NTP) server
-update: if ! grep -q '^server $VAR(@) ' /etc/ntp.conf
- then sudo sh -c \
- "echo \"server $VAR(@) iburst\" >> /etc/ntp.conf;
- /usr/sbin/invoke-rc.d ntp restart"
- fi
-delete: if grep -q '^server.*$VAR(@) ' /etc/ntp.conf
- then sudo sed -i '/^server $VAR(@) /d' /etc/ntp.conf
- if grep -q '^server ' /etc/ntp.conf
- then sudo /usr/sbin/invoke-rc.d ntp restart
- else sudo /usr/sbin/invoke-rc.d ntp stop
- fi
+create: if ! grep -q '^server $VAR(@) ' /etc/ntp.conf
+ then sudo sh -c \
+ "echo \"server $VAR(@) iburst\" >> /etc/ntp.conf; \
+ /usr/sbin/invoke-rc.d ntp restart"
+ elif ! /usr/sbin/invoke-rc.d ntp status
+ then sudo /usr/sbin/invoke-rc.d ntp start
fi
+delete: if grep -q '^server $VAR(@) ' /etc/ntp.conf
+ then sudo sed -i '/^server $VAR(@) /d' /etc/ntp.conf
+ if grep -q '^server ' /etc/ntp.conf
+ then sudo /usr/sbin/invoke-rc.d ntp restart
+ else sudo /usr/sbin/invoke-rc.d ntp stop
+ fi
+ fi