diff --git a/product-source/hololake-platform/guanghu-os/scripts/prepare-jd-native-resident-once.sh b/product-source/hololake-platform/guanghu-os/scripts/prepare-jd-native-resident-once.sh index 340f306..d51def7 100755 --- a/product-source/hololake-platform/guanghu-os/scripts/prepare-jd-native-resident-once.sh +++ b/product-source/hololake-platform/guanghu-os/scripts/prepare-jd-native-resident-once.sh @@ -12,7 +12,7 @@ candidate=$(readlink -f "$2") recovery_root=$(readlink -m "$3") expected_candidate_sha=$4 probe_recovery_root=$(readlink -f "$5") -source_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) +script_root=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) render_root=$(mktemp -d) trap 'rm -rf "${render_root}"' EXIT @@ -52,7 +52,7 @@ cp /etc/grub.d/40_custom "${recovery_root}/40_custom.before" cp "${candidate}" "${recovery_root}/jd-native-resident.img" cat /proc/sys/kernel/random/boot_id >"${recovery_root}/linux-boot-id.before" -"${source_root}/scripts/render-native-recovery-beacon.sh" "${render_root}" \ +"${script_root}/render-native-recovery-beacon.sh" "${render_root}" \ 139 gnulinux-simple-9e4550a0-452b-4f28-b5a5-d5364aa450f6 install -m 0755 "${render_root}/08_guanghu_native_recovery" \ /etc/grub.d/08_guanghu_native_recovery @@ -66,7 +66,7 @@ menuentry 'Guanghu OS JD native one-time resident' --id 'guanghu-jd-native-once' EOF install -D -m 0644 "${render_root}/guanghu-recovery-clear.env" \ /usr/lib/guanghu-os/jd-recovery-clear.env -install -D -m 0755 "${source_root}/scripts/clear-native-recovery-beacon.sh" \ +install -D -m 0755 "${script_root}/clear-native-recovery-beacon.sh" \ /usr/local/sbin/guanghu-clear-native-recovery-beacon install -m 0644 /dev/stdin \ /etc/systemd/system/guanghu-jd-native-recovery-clear.service <<'EOF'