Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions overlay.d/05core/usr/libexec/coreos-ignition-write-issues
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ $(cat /proc/sys/kernel/random/boot_id) = "${ignitionBoot}" ]; then
# checking for /run/ostree-live as the live system with persistent storage can run Ignition more than once
if ! test -f /run/ostree-live && jq -e .previousReport.provisioningDate "${IGNITION_RESULT}" &>/dev/null; then
prevdate=$(date --date "$(jq -r .previousReport.provisioningDate "${IGNITION_RESULT}")" +"%Y/%m/%d %H:%M:%S %Z")
cat << EOF > /etc/issue.d/30_coreos_ignition_run_more_than_once.issue
cat << EOF > /run/issue.d/30_coreos_ignition_run_more_than_once.issue
${WARN}
############################################################################
WARNING: Ignition previously ran on ${prevdate}. Unexpected
Expand Down Expand Up @@ -49,7 +49,7 @@ EOF
# TODO: find a way to query journal entries recorded before the
# system switches to real root
journalctl -t ignition -o cat -p warning | sed -r 's/, line [0-9]+ col [0-9]+//g' | sort -u | while read line; do
echo -e "${WARN}Ignition: $line${RESET}" >> /etc/issue.d/30_coreos_ignition_warnings.issue
echo -e "${WARN}Ignition: $line${RESET}" >> /run/issue.d/30_coreos_ignition_warnings.issue
Comment thread
jbtrystram marked this conversation as resolved.
done
else
nreboots=$(($(journalctl --list-boots | wc -l) - 1))
Expand All @@ -65,7 +65,3 @@ else
echo -e "${WARN}Ignition: no config provided by user${RESET}" \
>> /run/issue.d/30_coreos_ignition_provisioning.issue
fi

# Our makeshift way of getting /run/issue.d semantics. See:
# https://github.com/coreos/console-login-helper-messages/blob/e06fc88ae8fbcc3a422bc8c686f70c15aebb9d9a/usr/lib/console-login-helper-messages/issue.defs#L8-L17
ln -sf /run/issue.d/30_coreos_ignition_provisioning.issue /etc/issue.d/
4 changes: 2 additions & 2 deletions overlay.d/15fcos/usr/libexec/coreos-check-ssh-keys
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ main() {
fi

if [ -n "$output" ]; then
echo "$output" > /etc/issue.d/30_ssh_authorized_keys.issue
echo "$output" > /run/issue.d/30_coreos_ignition_ssh_authorized_keys.issue
else
echo -e "${warn}No SSH authorized keys provided by Ignition or Afterburn${nc}" \
> /etc/issue.d/30_ssh_authorized_keys.issue
> /run/issue.d/30_coreos_ignition_ssh_authorized_keys.issue
fi
}

Expand Down
2 changes: 1 addition & 1 deletion tests/kola/clhm/ignition-warnings/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WARN='\e\[0;33m' # yellow
RESET='\e\[0m' # reset

warning="${WARN}Ignition: warning at \\$.systemd.units.0.contents: unit \"echo.service\" is enabled, but has no install section so enable does nothing${RESET}"
warningsfile="/etc/issue.d/30_coreos_ignition_warnings.issue"
warningsfile="/run/issue.d/30_coreos_ignition_warnings.issue"

# Check for the motd file
if ! test -f ${warningsfile}; then
Expand Down
2 changes: 1 addition & 1 deletion tests/kola/clhm/network-device-info
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -xeuo pipefail
# shellcheck disable=SC1091
. "$KOLA_EXT_DATA/commonlib.sh"

for file in /etc/issue.d/22*.issue
for file in /run/issue.d/22*.issue
do
if [ ! -f "$file" ]; then
fatal "Network Device info does not exist"
Expand Down