Browse Source

Only remove motd instructions once

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

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

@@ -379,7 +379,9 @@ function mark_admin_user_account {
379 379
 }
380 380
 
381 381
 function remove_instructions_from_motd {
382
-    sed -i '/## /d' /etc/motd
382
+    if grep -q "## " /etc/motd; then
383
+        sed -i '/## /d' /etc/motd
384
+    fi
383 385
 }
384 386
 
385 387
 function remove_default_user {