浏览代码

Only remove motd instructions once

Bob Mottram 8 年前
父节点
当前提交
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 {