ref: 9cee84779366c8b7b2a39cf997d42b736ead4a40
parent: 183fef559543764a6e87fcc8df4e316a8f7168a3
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sat Aug 20 12:38:45 EDT 2022
fshalt: support relative paths to the new kernel
--- a/rc/bin/fshalt
+++ b/rc/bin/fshalt
@@ -14,6 +14,12 @@
exit usage
}
+if(~ $reboot yes && ~ $#* 1){
+ bootf=$1
+ if(! ~ $bootf /*)
+ bootf=`{builtin pwd}^/$bootf
+}
+
path=(/bin)
builtin cd /
bind -c '#s' /srv
@@ -47,8 +53,8 @@
cp /bin/sleep /tmp
cp /bin/scram /tmp
cp /bin/test /tmp
-if(~ $reboot yes && ~ $#* 1){
- if(! cp $1 /tmp/bootf)
+if(~ $#bootf 1){
+ if(! cp $bootf /tmp/bootf)
exit 'failed to copy kernel'
bootf=/bin/bootf
}
--
⑨