summaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-14 09:44:21 -0400
committerScott Moser <smoser@ubuntu.com>2016-03-14 09:44:21 -0400
commit24bd640d20383116d1285361d7e86eda9e9d20e8 (patch)
treea18fb8a806a0dc3bfc51fe45819d0057fa327195 /systemd
parentd0a706e0302e281179a7e274ca97d8b995e4570d (diff)
downloadvyos-cloud-init-24bd640d20383116d1285361d7e86eda9e9d20e8.tar.gz
vyos-cloud-init-24bd640d20383116d1285361d7e86eda9e9d20e8.zip
minor cleanup. long line and remove unused 'local'
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/cloud-init-generator6
1 files changed, 3 insertions, 3 deletions
diff --git a/systemd/cloud-init-generator b/systemd/cloud-init-generator
index 8156db58..2d319695 100755
--- a/systemd/cloud-init-generator
+++ b/systemd/cloud-init-generator
@@ -35,9 +35,9 @@ etc_file() {
read_proc_cmdline() {
# return /proc/cmdline for non-container, and /proc/1/cmdline for container
local ctname="systemd"
- if [ -n "$CONTAINER" ] && ctname=$CONTAINER || systemd-detect-virt --container --quiet; then
- local
- if _RET=$(tr '\0' ' ' < /proc/1/cmdline) >/dev/null 2>&1; then
+ if [ -n "$CONTAINER" ] && ctname=$CONTAINER ||
+ systemd-detect-virt --container --quiet; then
+ if { _RET=$(tr '\0' ' ' < /proc/1/cmdline); } 2>/dev/null; then
_RET_MSG="container[$ctname]: pid 1 cmdline"
return
fi