summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-12-08 14:51:29 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-12-08 14:51:29 -0800
commit1bc0fdfe092c6a3e2efff1dc644cde138fa0ab98 (patch)
treee6a8784c1a74afaef344cc6c37188d36c619c410
parentf61f4f85b6a84e2d0c82c81ec4e9031dd6a9b9e2 (diff)
parentf956bfc6ee753fbbf251a7c43e7ad2573aa89c83 (diff)
downloadvyatta-cfg-system-1bc0fdfe092c6a3e2efff1dc644cde138fa0ab98.tar.gz
vyatta-cfg-system-1bc0fdfe092c6a3e2efff1dc644cde138fa0ab98.zip
Merge branch 'kenwood' of 192.168.100.1:git/vyatta-cfg-system into kenwood
-rwxr-xr-xlib/Vyatta/Login/User.pm12
-rw-r--r--sysconf/vyatta-net.rules7
2 files changed, 15 insertions, 4 deletions
diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm
index 3b1170ff..b03b90b7 100755
--- a/lib/Vyatta/Login/User.pm
+++ b/lib/Vyatta/Login/User.pm
@@ -159,14 +159,18 @@ sub update {
my %users = $uconfig->listNodeStatus();
die "All users deleted!\n" unless %users;
- die "User root cannot be deleted\n"
- if (! defined $users{'root'} || $users{'root'} eq 'deleted');
foreach my $user ( keys %users ) {
my $state = $users{$user};
if ( $state eq 'deleted' ) {
- system("sudo userdel -r '$user'") == 0
- or die "userdel failed: $?\n";
+ if ($user eq 'root') {
+ warn "Disabling root account, instead of deleting\n";
+ system ('sudo usermod -p ! root') == 0
+ or die "usermod of root failed: $?\n";
+ } else {
+ system("sudo userdel -r '$user'") == 0
+ or die "userdel of $user failed: $?\n";
+ }
next;
}
diff --git a/sysconf/vyatta-net.rules b/sysconf/vyatta-net.rules
index a215c325..a94f5b2a 100644
--- a/sysconf/vyatta-net.rules
+++ b/sysconf/vyatta-net.rules
@@ -9,5 +9,12 @@ KERNEL=="eth*", DRIVERS=="?*",\
PROGRAM="vyatta_net_name %k $attr{address}", \
NAME="%c"
+# This keeps udev persistent net rules from trying to do anything
+# with multiple SSID's per device
+# TODO: Add proper persistent network based on Vyatta config
+# but right now there is insufficient info in sysfs to uniquely
+# determine device name based on hardware information
+KERNEL=="wlan*", DRIVERS=="?*", NAME="%k"
+
LABEL="vyatta_net_end"