diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-03-10 10:41:48 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-03-10 10:41:48 -0500 |
commit | b1d9c92f5bc6f711e104ceb981ded658249c3255 (patch) | |
tree | 3feaa02dc34693c6f34cb6ea96d8853c080606a3 /systemd | |
parent | 2f29e70d99906dd7bff0c64109a77f609577f063 (diff) | |
download | vyos-cloud-init-b1d9c92f5bc6f711e104ceb981ded658249c3255.tar.gz vyos-cloud-init-b1d9c92f5bc6f711e104ceb981ded658249c3255.zip |
generator: use /run/cloud-init instead of /run
Diffstat (limited to 'systemd')
-rwxr-xr-x | systemd/cloud-init-generator | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/systemd/cloud-init-generator b/systemd/cloud-init-generator index b7a2f17a..8156db58 100755 --- a/systemd/cloud-init-generator +++ b/systemd/cloud-init-generator @@ -3,7 +3,7 @@ set -f LOG="" DEBUG_LEVEL=1 -LOG_D="/run" +LOG_D="/run/cloud-init" ENABLE="enabled" DISABLE="disabled" CLOUD_SYSTEM_TARGET="/lib/systemd/system/cloud-init.target" @@ -17,7 +17,8 @@ debug() { [ "$lvl" -gt "$DEBUG_LEVEL" ] && return if [ -z "$LOG" ]; then local log="$LOG_D/${0##*/}.log" - { : > "$log"; } >/dev/null 2>&1 && LOG="$log" || + { [ -d "$LOG_D" ] || mkdir -p "$LOG_D"; } && + { : > "$log"; } >/dev/null 2>&1 && LOG="$log" || LOG="/dev/kmsg" fi echo "$@" >> "$LOG" |