14 lines
662 B
Shell
14 lines
662 B
Shell
#!/usr/bin/env bash
|
|
set -Eeuo pipefail
|
|
source_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
|
subject=${source_root}/scripts/set-jd-guanghu-master-default.sh
|
|
bash -n "$subject"
|
|
grep -Fq "state['control'] == 'GUANGHU_OS_MASTER'" "$subject"
|
|
grep -Fq "state['full_linux_userspace'] == 'DORMANT'" "$subject"
|
|
grep -Fq "lines[matches[0]] = 'GRUB_DEFAULT=\${master_entry}'" "$subject"
|
|
grep -Fq 'enter-once)' "$subject"
|
|
grep -Fq 'next_entry="$linux_entry"' "$subject"
|
|
grep -Fq 'return_default=%s' "$subject"
|
|
grep -Fq 'linux_rescue=${linux_entry}' "$subject"
|
|
grep -Fq 'result=ARMED_FOR_DEFAULT_BOOT_PROOF' "$subject"
|
|
echo GUANGHU_MASTER_DEFAULT_CUTOVER_CONTRACT_OK
|