File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
scripts/nand-sata-install/usr/lib/nand-sata-install Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ create_armbian()
106
106
StopRunningServices " nfs-|smbd|nmbd|winbind|ftpd|netatalk|monit|cron|webmin|rrdcached" >> $logfile
107
107
StopRunningServices " log2ram|postgres|mariadb|mysql|postfix|mail|nginx|apache|snmpd" >> $logfile
108
108
echo -e " \n" >> $logfile
109
+ logfile=" /mnt/rootfs/var/log/nand-sata-install.log"
109
110
110
111
# count files is needed for progress bar
111
112
dialog --title " $title " --backtitle " $backtitle " --infobox " \n Counting files ... few seconds." 5 40
@@ -425,14 +426,14 @@ main()
425
426
{
426
427
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
427
428
428
- # if mounted
429
- umount /mnt/rootfs >> $logfile 2>&1
430
- umount /mnt/bootfs >> $logfile 2>&1
429
+ # umount temporary mountpoints if mounted
430
+ grep -q /mnt/rootfs /etc/mtab && umount -frv /mnt/rootfs >> $logfile 2>&1
431
+ grep -q /mnt/bootfs /etc/mtab && umount -frv /mnt/bootfs >> $logfile 2>&1
431
432
432
433
# This tool must run under root
433
434
434
435
if [[ $EUID -ne 0 ]]; then
435
- echo " This tool must run as root. Exiting ..."
436
+ echo " This tool must run as root. Exiting ..." >&2
436
437
exit 1
437
438
fi
438
439
You can’t perform that action at this time.
0 commit comments