소스 검색

Only remove motd instructions once

Bob Mottram 7 년 전
부모
커밋
bd86c4b19a
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3
    1
      src/freedombone-utils-setup

+ 3
- 1
src/freedombone-utils-setup 파일 보기

@@ -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 {