Skip to content

Commit

Permalink
MTL-1285 Pre-reqs (FIXED) (#23)
Browse files Browse the repository at this point in the history
MTL-1285 Change to bash for more logging utils

Add require_binary check

This reverts commit ebe7988.
  • Loading branch information
rustydb authored Dec 21, 2021
1 parent ebe7988 commit 7a5d1d5
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.6.1
2 changes: 1 addition & 1 deletion 93metalluksetcd/metal-luksetcd-disk.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

# DEVICES EXIST or DIE
[ -f /tmp/metaletcddisk.done ] && exit 0
Expand Down
4 changes: 2 additions & 2 deletions 93metalluksetcd/metal-luksetcd-genrules.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

command -v getarg >/dev/null || . /lib/dracut-lib.sh

Expand All @@ -7,4 +7,4 @@ command -v getarg >/dev/null || . /lib/dracut-lib.sh
# Only run when we're being provisioned by a metal.server
if getargbool 0 rd.luks -d -n rd_NO_LUKS; then
/sbin/initqueue --settled --onetime --unique /sbin/metal-luksetcd-disk
fi
fi
2 changes: 1 addition & 1 deletion 93metalluksetcd/metal-luksetcd-unlock.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# metal-luksetcd-unlock.sh

type unlock > /dev/null 2>&1 || . /lib/metal-luksetcd-lib.sh
Expand Down
2 changes: 1 addition & 1 deletion 93metalluksetcd/metal-update-keystore.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -u
# metal-update-keystore
# This file copies our master-key to the overlayFS.
Expand Down
5 changes: 3 additions & 2 deletions 93metalluksetcd/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

# called by dracut
check() {
return 0
require_binaries basename cryptsetup lvm mkfs.xfs parted || return 1
return
}

# called by dracut
Expand All @@ -17,7 +18,7 @@ installkernel() {

# called by dracut
install() {
inst_multiple parted mkfs.xfs lsblk sort tail lvm vgcreate lvcreate cryptsetup pvs chmod basename
inst_multiple basename chmod cryptsetup lsblk lvcreate lvm mkfs.xfs parted pvs sort tail vgcreate

inst_simple "$moddir/metal-luksetcd-lib.sh" "/lib/metal-luksetcd-lib.sh"
inst_script "$moddir/metal-luksetcd-disk.sh" /sbin/metal-luksetcd-disk
Expand Down
2 changes: 1 addition & 1 deletion 93metalluksetcd/parse-metal-luksetcd.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Copyright 2020 Hewlett Packard Enterprise Development LP
#
Expand Down

0 comments on commit 7a5d1d5

Please sign in to comment.