Browse Source

Check that admin sudoer doesn't already exist

Bob Mottram 8 years ago
parent
commit
345e9f0ef1
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/freedombone-utils-setup

+ 3
- 1
src/freedombone-utils-setup View File

@@ -108,7 +108,9 @@ function initial_setup {
108 108
 }
109 109
 
110 110
 function admin_user_sudo {
111
-    echo "$MY_USERNAME  ALL=(ALL) ALL" >> $rootdir/etc/sudoers
111
+    if ! grep "$MY_USERNAME  ALL=(ALL) ALL" $rootdir/etc/sudoers; then
112
+        echo "$MY_USERNAME  ALL=(ALL) ALL" >> $rootdir/etc/sudoers
113
+    fi
112 114
 }
113 115
 
114 116
 function search_for_attached_usb_drive {