Skip to content

Commit

Permalink
Merge pull request #677 from mmartinv/fix-dracut-systemd-generator
Browse files Browse the repository at this point in the history
fix(systemd-generator): write configuration to '/run'
  • Loading branch information
mergify[bot] authored Oct 2, 2024
2 parents 5b20d5a + fdeebe4 commit b1f6887
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions dracut/52fdo/manufacturing-client-generator
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@ diun_pub_key_insecure=$(getarg fdo.diun_pub_key_insecure= ||:)
diun_pub_key_hash=$(getarg fdo.diun_pub_key_hash= ||:)
diun_pub_key_root_certs=$(getarg fdo.diun_pub_key_root_certs= ||:)
mfg_string_type_mac_iface=$(getarg fdo.di_mfg_string_type_mac_iface= ||:)
cat >"/etc/manufacturing-client-config" <<EOF
cat >"/run/manufacturing-client-config" <<EOF
# Automatically generated by live-generator
MANUFACTURING_SERVER_URL="${manufacturing_server_url}"
EOF
if [ -n "${diun_pub_key_insecure}" ]; then
cat >>"/etc/manufacturing-client-config" <<EOF
cat >>"/run/manufacturing-client-config" <<EOF
DIUN_PUB_KEY_INSECURE="${diun_pub_key_insecure}"
EOF
fi
if [ -n "${diun_pub_key_hash}" ]; then
cat >>"/etc/manufacturing-client-config" <<EOF
cat >>"/run/manufacturing-client-config" <<EOF
DIUN_PUB_KEY_HASH="${diun_pub_key_hash}"
EOF
fi
if [ -n "${diun_pub_key_root_certs}" ]; then
cat >>"/etc/manufacturing-client-config" <<EOF
cat >>"/run/manufacturing-client-config" <<EOF
DIUN_PUB_KEY_ROOTCERTS="${diun_pub_key_root_certs}"
EOF
fi

if [ -n "${mfg_string_type_mac_iface}" ]; then
cat >>"/etc/manufacturing-client-config" <<EOF
cat >>"/run/manufacturing-client-config" <<EOF
DI_MFG_STRING_TYPE_MAC_IFACE="${mfg_string_type_mac_iface}"
EOF
fi
4 changes: 2 additions & 2 deletions dracut/52fdo/manufacturing-client.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=coreos-installer.service
Before=coreos-installer-poweroff.service
Before=coreos-installer-noreboot.service
Before=coreos-installer-reboot.service
ConditionPathExists=/etc/manufacturing-client-config
ConditionPathExists=/run/manufacturing-client-config
Requires=dev-disk-by\x2dlabel-boot.device

OnFailure=emergency.target
Expand All @@ -15,6 +15,6 @@ OnFailureJobMode=isolate
[Service]
Type=oneshot
Environment=LOG_LEVEL=info
EnvironmentFile=/etc/manufacturing-client-config
EnvironmentFile=/run/manufacturing-client-config
ExecStart=/usr/libexec/manufacturing-client-service
RemainAfterExit=yes

0 comments on commit b1f6887

Please sign in to comment.