mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
Feature/multi platform (#1866)
* wip * wip * wip * wip * wip * wip * remove debian dir * lazy env and git hash * remove env and git hash on clean * don't leave project dir * use docker for native builds * start9 rust * correctly mount registry * remove systemd config * switch to /usr/bin * disable sound for now * wip * change disk list * multi-arch images * multi-arch system images * default aarch64 * edition 2021 * dynamic wifi interface name * use wifi interface from config * bugfixes * add beep based sound * wip * wip * wip * separate out raspberry pi specific files * fixes * use new initramfs always * switch journald conf to sed script * fixes * fix permissions * talking about kernel modules not scripts * fix * fix * switch to MBR * install to /usr/lib * fixes * fixes * fixes * fixes * add media config to cfg path * fixes * fixes * fixes * raspi image fixes * fix test * fix workflow * sync boot partition * gahhhhh
This commit is contained in:
34
build/lib/scripts/grub-probe-eos
Executable file
34
build/lib/scripts/grub-probe-eos
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
ARGS=
|
||||
|
||||
for ARG in $@; do
|
||||
if [ "${ARG%%[!/]*}" = "/" ]; then
|
||||
|
||||
OPTIONS=
|
||||
|
||||
path="$ARG"
|
||||
while true; do
|
||||
if FSTYPE=$( findmnt -n -o FSTYPE "$path" ); then
|
||||
if [ "$FSTYPE" = "overlay" ]; then
|
||||
OPTIONS=$(findmnt -n -o OPTIONS "$path")
|
||||
break
|
||||
else
|
||||
break
|
||||
fi
|
||||
fi
|
||||
if [ "$path" = "/" ]; then break; fi
|
||||
path=$(dirname "$path")
|
||||
done
|
||||
|
||||
if LOWERDIR=$(echo "$OPTIONS" | grep -m 1 -oP 'lowerdir=\K[^,]+'); then
|
||||
#echo "[DEBUG] Overlay filesystem detected ${ARG} --> ${LOWERDIR}${ARG%*/}" 1>&2
|
||||
ARG=/media/embassy/embassyfs"${ARG%*/}"
|
||||
fi
|
||||
fi
|
||||
ARGS="$ARGS $ARG"
|
||||
done
|
||||
|
||||
grub-probe-default $ARGS
|
||||
|
||||
exit $?
|
||||
Reference in New Issue
Block a user