浏览代码

Remove automatic motd creator if it exists

Bob Mottram 9 年前
父节点
当前提交
195735cc51
共有 2 个文件被更改,包括 11 次插入0 次删除
  1. 6
    0
      src/freedombone
  2. 5
    0
      src/freedombone-prep

+ 6
- 0
src/freedombone 查看文件

5166
   if grep -Fxq "change_login_message" $COMPLETION_FILE; then
5166
   if grep -Fxq "change_login_message" $COMPLETION_FILE; then
5167
       return
5167
       return
5168
   fi
5168
   fi
5169
+
5170
+  # remove automatic motd creator if it exists
5171
+  if [ -f /etc/init.d/motd ]; then
5172
+      rm -f /etc/init.d/motd
5173
+  fi
5174
+
5169
   echo '' > /etc/motd
5175
   echo '' > /etc/motd
5170
   echo ".---.                  .              .                   " >> /etc/motd
5176
   echo ".---.                  .              .                   " >> /etc/motd
5171
   echo "|                      |              |                   " >> /etc/motd
5177
   echo "|                      |              |                   " >> /etc/motd

+ 5
- 0
src/freedombone-prep 查看文件

251
     exit 8736
251
     exit 8736
252
 fi
252
 fi
253
 
253
 
254
+# remove automatic motd creator if it exists
255
+if [ -f $MICROSD_MOUNT_POINT/$ROOTFS/etc/init.d/motd ]; then
256
+    $SUDO rm -f $MICROSD_MOUNT_POINT/$ROOTFS/etc/init.d/motd
257
+fi
258
+
254
 # change the motd to show further install instructions
259
 # change the motd to show further install instructions
255
 echo '' >> /tmp/freedombone_motd
260
 echo '' >> /tmp/freedombone_motd
256
 echo 'Create a user for the system with:' >> /tmp/freedombone_motd
261
 echo 'Create a user for the system with:' >> /tmp/freedombone_motd