diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2021-06-11 10:43:20 +0800 |
---|---|---|
committer | Jia Zhang <zhang.jia@linux.alibaba.com> | 2021-06-11 15:43:47 +0800 |
commit | ba04fbba711217e2a7c10270fe932146564f6229 (patch) | |
tree | e1c4b60fd1c3a0d09754191b8c76deabd094048c | |
parent | b9f183a416726e6a89ebceb7c56f3d1964ad8dc0 (diff) | |
download | meta-secure-core-ba04fbba711217e2a7c10270fe932146564f6229.tar.gz |
create-user-key-store.sh: use grub2-mkpasswd-pbkdf2 rather than grub-mkpasswd-pbkdf2 on RHEL/CentOS/Fedora
On RHEL/CentOS/Fedora, there is no grub-mkpasswd-pbkdf2 command but
grub2-mkpasswd-pbkdf2. Update the script to locate the appropriate
command.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
-rwxr-xr-x | meta-signing-key/scripts/create-user-key-store.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta-signing-key/scripts/create-user-key-store.sh b/meta-signing-key/scripts/create-user-key-store.sh index 0d55d2a..0b4b9fa 100755 --- a/meta-signing-key/scripts/create-user-key-store.sh +++ b/meta-signing-key/scripts/create-user-key-store.sh | |||
@@ -304,7 +304,11 @@ create_ima_user_key() { | |||
304 | create_boot_pw_key() { | 304 | create_boot_pw_key() { |
305 | local bootprog=`which grub-mkpasswd-pbkdf2` | 305 | local bootprog=`which grub-mkpasswd-pbkdf2` |
306 | if [ "$bootprog" = "" ] ; then | 306 | if [ "$bootprog" = "" ] ; then |
307 | print_fatal "ERROR could not locate \"grub-mkpasswd-pbkdf2\" please install it or set the path to the host native sysroot" | 307 | # Locate grub2-mkpasswd-pbkdf2 on RHEL/CentOS/Fedora |
308 | bootprog=`which grub2-mkpasswd-pbkdf2` | ||
309 | if [ "$bootprog" = "" ] ; then | ||
310 | print_fatal "ERROR could not locate \"grub-mkpasswd-pbkdf2\" or \"grub2-mkpasswd-pbkdf2\" please install it or set the path to the host native sysroot" | ||
311 | fi | ||
308 | fi | 312 | fi |
309 | (echo "$BOOT_PASS"; echo "$BOOT_PASS") | $bootprog > $BOOT_KEYS_DIR/boot_cfg_pw.tmp | 313 | (echo "$BOOT_PASS"; echo "$BOOT_PASS") | $bootprog > $BOOT_KEYS_DIR/boot_cfg_pw.tmp |
310 | if [ $? != 0 ] ; then | 314 | if [ $? != 0 ] ; then |