Bob Mottram пре 9 година
родитељ
комит
b88f433a8e
1 измењених фајлова са 16 додато и 2 уклоњено
  1. 16
    2
      src/freedombone-image-customise

+ 16
- 2
src/freedombone-image-customise Прегледај датотеку

232
     echo '        NEW_USER_PASSWORD="$(openssl rand -base64 12 | cut -c1-10)"' >> $rootdir/root/.bashrc
232
     echo '        NEW_USER_PASSWORD="$(openssl rand -base64 12 | cut -c1-10)"' >> $rootdir/root/.bashrc
233
     echo '    fi' >> $rootdir/root/.bashrc
233
     echo '    fi' >> $rootdir/root/.bashrc
234
     echo '    echo "${NEW_USER_PASSWORD}" > ~/login.txt' >> $rootdir/root/.bashrc
234
     echo '    echo "${NEW_USER_PASSWORD}" > ~/login.txt' >> $rootdir/root/.bashrc
235
-    echo '    dialog --backtitle "Freedombone initial setup process" --title "New Password" --msgbox "This is your new password. Use it whenever you wish to ssh into this system.\n\n                 $NEW_USER_PASSWORD\n\nPlease take a moment to copy the above password into a password manager or write it down somewhere." 12 50' >> $rootdir/root/.bashrc
235
+
236
+    echo '    clear' >> $rootdir/root/.bashrc
237
+    echo '    echo ""' >> $rootdir/root/.bashrc
238
+    echo '    echo "Your new login password is:"' >> $rootdir/root/.bashrc
239
+    echo '    echo ""' >> $rootdir/root/.bashrc
240
+    echo '    toilet "${NEW_USER_PASSWORD}"' >> $rootdir/root/.bashrc
241
+    echo '    echo ""' >> $rootdir/root/.bashrc
242
+    echo '    echo "                          ${NEW_USER_PASSWORD}"' >> $rootdir/root/.bashrc
243
+    echo '    echo ""' >> $rootdir/root/.bashrc
244
+    echo '    echo "Use it whenever you wish to ssh into this system."' >> $rootdir/root/.bashrc
245
+    echo '    echo ""' >> $rootdir/root/.bashrc
246
+    echo '    echo "IMPORTANT: Please take a moment to enter the above password into a password manager or write it down somewhere."' >> $rootdir/root/.bashrc
247
+    echo '    echo ""' >> $rootdir/root/.bashrc
248
+    echo '    read -n1 -r -p "Press any key to continue..." key' >> $rootdir/root/.bashrc
249
+    
236
     # change the password for the admin user
250
     # change the password for the admin user
237
     echo -n "    echo \"${MY_USERNAME}:" >> $rootdir/root/.bashrc
251
     echo -n "    echo \"${MY_USERNAME}:" >> $rootdir/root/.bashrc
238
     echo '$(printf `cat ~/login.txt`)"|chpasswd' >> $rootdir/root/.bashrc
252
     echo '$(printf `cat ~/login.txt`)"|chpasswd' >> $rootdir/root/.bashrc
320
     chroot "$rootdir" gdebi -n /tmp/"$(basename $CUSTOM_SETUP)"
334
     chroot "$rootdir" gdebi -n /tmp/"$(basename $CUSTOM_SETUP)"
321
 fi
335
 fi
322
 
336
 
323
-chroot "$rootdir" apt-get install -y sudo git dialog build-essential openssh-server
337
+chroot "$rootdir" apt-get install -y sudo git dialog toilet build-essential openssh-server
324
 chroot "$rootdir" apt-get install -y avahi-daemon avahi-utils avahi-discover
338
 chroot "$rootdir" apt-get install -y avahi-daemon avahi-utils avahi-discover
325
 chroot "$rootdir" /bin/bash -x <<EOF
339
 chroot "$rootdir" /bin/bash -x <<EOF
326
 git clone https://github.com/bashrc/freedombone /root/freedombone
340
 git clone https://github.com/bashrc/freedombone /root/freedombone