Skip to content

Commit 4cc60de

Browse files
authored
fix missing pkcs11 when libexecdir is configured (#522)
1 parent e010e18 commit 4cc60de

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

src/luks/dracut/clevis-pin-pkcs11/clevis-pkcs11-hook.sh renamed to src/luks/dracut/clevis-pin-pkcs11/clevis-pkcs11-hook.sh.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
if [ ! -f /run/systemd/clevis-pkcs11.run ] && [ -d /run/systemd ];
2222
then
2323
clevis_start_pcscd_server
24-
echo "" > /run/systemd/clevis-pkcs11.run
25-
/usr/libexec/clevis-luks-pkcs11-askpin -d -r
24+
echo "" >/run/systemd/clevis-pkcs11.run
25+
@libexecdir@/clevis-luks-pkcs11-askpin -d -r
2626
fi

src/luks/dracut/clevis-pin-pkcs11/meson.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ if dracut.found()
1010
configuration: data,
1111
)
1212

13-
install_data('clevis-pkcs11-hook.sh', install_dir: dracutdir)
13+
configure_file(
14+
input: 'clevis-pkcs11-hook.sh.in',
15+
output: 'clevis-pkcs11-hook.sh',
16+
install_dir: dracutdir,
17+
configuration: data,
18+
)
1419
install_data('clevis-pkcs11-prehook.sh', install_dir: dracutdir)
1520

1621
else

src/luks/dracut/clevis-pin-pkcs11/module-setup.sh.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ install() {
5151
/etc/opensc.conf \
5252
/usr/lib64/ossl-modules/legacy.so \
5353
/lib64/libpcsclite.so.1 \
54-
/usr/libexec/clevis-luks-pkcs11-askpass \
55-
/usr/libexec/clevis-luks-pkcs11-askpin \
54+
@libexecdir@/clevis-luks-pkcs11-askpass \
55+
@libexecdir@/clevis-luks-pkcs11-askpin \
5656
clevis-luks-common-functions \
5757
clevis-pkcs11-afunix-socket-unlock \
5858
clevis-pkcs11-common \

src/luks/systemd/clevis-luks-pkcs11-askpass.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# You should have received a copy of the GNU General Public License
1717
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
#
19-
/usr/libexec/clevis-luks-pkcs11-askpin -r &
19+
@libexecdir@/clevis-luks-pkcs11-askpin -r &
2020
# Wait 60 seconds to attend key requests from systemd
2121
# If control socket starts receiving information, this time is cancelled
2222
clevis-pkcs11-afunix-socket-unlock -l /run/systemd/clevis-pkcs11-systemd.log -f /run/systemd/clevis-pkcs11.sock -s 60

src/luks/systemd/clevis-luks-pkcs11-askpass.service.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ PartOf=clevis-luks-pkcs11-askpass.socket
55

66
[Service]
77
Type=simple
8-
ExecStart=/usr/libexec/clevis-luks-pkcs11-askpass
8+
ExecStart=@libexecdir@/clevis-luks-pkcs11-askpass

0 commit comments

Comments
 (0)