Просмотр исходного кода

Only remove motd instructions once

Bob Mottram 8 лет назад
Родитель
Сommit
bd86c4b19a
1 измененных файлов: 3 добавлений и 1 удалений
  1. 3
    1
      src/freedombone-utils-setup

+ 3
- 1
src/freedombone-utils-setup Просмотреть файл

379
 }
379
 }
380
 
380
 
381
 function remove_instructions_from_motd {
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
 function remove_default_user {
387
 function remove_default_user {