浏览代码

Add instructions to the motd for the second phase of bbb installation

Bob Mottram 10 年前
父节点
当前提交
e01468148c
共有 1 个文件被更改,包括 15 次插入4 次删除
  1. 15
    4
      src/freedombone

+ 15
- 4
src/freedombone 查看文件

@@ -1389,6 +1389,10 @@ function install_cjdns_tools {
1389 1389
   echo 'install_cjdns_tools' >> $COMPLETION_FILE
1390 1390
 }
1391 1391
 
1392
+function remove_instructions_from_motd {
1393
+    sed -i '/## /d' /etc/motd
1394
+}
1395
+
1392 1396
 function check_hwrng {
1393 1397
   # If hardware random number generation was enabled then make sure that the device exists.
1394 1398
   # if /dev/hwrng is not found then any subsequent cryptographic key generation would
@@ -1873,7 +1877,7 @@ function create_backup_script {
1873 1877
   echo "    mkdir -p /root/backupemail" >> /usr/bin/$BACKUP_SCRIPT_NAME
1874 1878
   echo '  fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
1875 1879
   echo "  tar -czvf /root/backupemail/maildir.tar.gz /home/$MY_USERNAME/Maildir" >> /usr/bin/$BACKUP_SCRIPT_NAME
1876
-  echo '  echo "Backing up emails"' >> /usr/bin/$BACKUP_SCRIPT_NAME  
1880
+  echo '  echo "Backing up emails"' >> /usr/bin/$BACKUP_SCRIPT_NAME
1877 1881
   echo "  if [ ! -d $USB_MOUNT/backup/mail ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
1878 1882
   echo "    mkdir -p $USB_MOUNT/backup/mail" >> /usr/bin/$BACKUP_SCRIPT_NAME
1879 1883
   echo '  fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
@@ -4230,6 +4234,12 @@ function configure_ssh {
4230 4234
   echo ''
4231 4235
   echo "  *** Reconnect via ssh on port $SSH_PORT, then run this script again  ***"
4232 4236
   echo ''
4237
+  echo '## ' >> /etc/motd
4238
+  echo '## Type "su" and enter your administrator password, then use the command:' >> /etc/motd
4239
+  echo '## ' >> /etc/motd
4240
+  echo '##   freedombone -c freedombone.cfg' >> /etc/motd
4241
+  echo '## ' >> /etc/motd
4242
+  echo '## to continue the installation.' >> /etc/motd
4233 4243
   reboot
4234 4244
 }
4235 4245
 
@@ -6589,10 +6599,10 @@ function install_wiki {
6589 6599
   chown www-data /var/lib/dokuwiki/custom
6590 6600
   chown www-data /var/lib/dokuwiki/custom/local.php
6591 6601
   chown -R www-data /etc/dokuwiki
6592
-  chown -R www-data /usr/share/dokuwiki/lib/  
6602
+  chown -R www-data /usr/share/dokuwiki/lib/
6593 6603
   chmod 600 /var/lib/dokuwiki/custom/local.php
6594 6604
   chmod -R 755 /usr/share/dokuwiki/lib
6595
-  
6605
+
6596 6606
   sed -i 's|//$conf|$conf|g' /var/lib/dokuwiki/custom/local.php
6597 6607
   sed -i "s|joe|$MY_USERNAME|g" /var/lib/dokuwiki/custom/local.php
6598 6608
 
@@ -8218,7 +8228,7 @@ function install_dynamicdns {
8218 8228
 
8219 8229
   # create an unprivileged user
8220 8230
   #useradd -r -s /bin/false debian-inadyn
8221
-  
8231
+
8222 8232
   # create a configuration file
8223 8233
   echo 'background' > /etc/inadyn.conf
8224 8234
   echo 'verbose        1' >> /etc/inadyn.conf
@@ -8502,6 +8512,7 @@ install_cjdns
8502 8512
 install_cjdns_tools
8503 8513
 backup_github_projects
8504 8514
 configure_ssh
8515
+remove_instructions_from_motd
8505 8516
 check_hwrng
8506 8517
 search_for_attached_usb_drive
8507 8518
 regenerate_ssh_keys