File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,9 @@ install -dm 0700 /tmp/.trash
5151
5252# grab used ovl filename from dmesg
5353ovl=" $( dmesg | grep -o ' Loading user settings from .*:' | awk ' {print $5}' | sed ' s/:.*$//' ) "
54- ovlpath=" $( dirname " $ovl " ) "
54+ ovl=" $( basename " ${ovl} " ) "
55+ # search path again as mountpoint may have been changed later in the boot process...
56+ ovlpath=$( find /media -maxdepth 2 -type d -path ' */.*' -prune -o -type f -name " ${ovl} " -exec dirname {} \; | head -1 )
5557
5658# Help randomness for wpa_supplicant and ssh server
5759rc-service seedrng start
@@ -163,7 +165,7 @@ cat <<-EOF > /tmp/.trash/banner
163165 Alpine Linux headless bootstrap v$VERSION by macmpi
164166
165167You may want to delete/rename .apkovl file before reboot ${warn} :
166- $ovl
168+ ${ovlpath} / ${ ovl}
167169(can be done automatically with unattended script - see sample snippet)
168170
169171
Original file line number Diff line number Diff line change @@ -14,13 +14,16 @@ sleep 60
1414
1515
1616# # This snippet removes apkovl file on volume after initial boot
17+ # grab used ovl filename from dmesg
1718ovl=" $( dmesg | grep -o ' Loading user settings from .*:' | awk ' {print $5}' | sed ' s/:.*$//' ) "
18- ovlpath=" $( dirname " $ovl " ) "
19+ ovl=" $( basename " ${ovl} " ) "
20+ # search path again as mountpoint may have been changed later in the boot process...
21+ ovlpath=$( find /media -maxdepth 2 -type d -path ' */.*' -prune -o -type f -name " ${ovl} " -exec dirname {} \; | head -1 )
1922
2023# also works in case volume is mounted read-only
2124grep -q " ${ovlpath} .*[[:space:]]ro[[:space:],]" /proc/mounts; RO=$?
2225[ " $RO " -eq " 0" ] && mount -o remount,rw " ${ovlpath} "
23- rm -f " ${ovl} "
26+ rm -f " ${ovlpath} / ${ ovl}"
2427[ " $RO " -eq " 0" ] && mount -o remount,ro " ${ovlpath} "
2528
2629# #######################################################
You can’t perform that action at this time.
0 commit comments