forked from ungleich-public/cdist
Merge pull request #620 from thriqon/130-issue-stdin
Allow reading contents of __motd and __issue from stdin
This commit is contained in:
commit
87558adbda
2 changed files with 6 additions and 0 deletions
|
@ -25,6 +25,9 @@ os="$(cat "$__global/explorer/os")"
|
||||||
|
|
||||||
if [ -f "$__object/parameter/source" ]; then
|
if [ -f "$__object/parameter/source" ]; then
|
||||||
source="$(cat "$__object/parameter/source")"
|
source="$(cat "$__object/parameter/source")"
|
||||||
|
if [ "$source" = "-" ]; then
|
||||||
|
source="${__object}/stdin"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
case "$os" in
|
case "$os" in
|
||||||
archlinux|redhat)
|
archlinux|redhat)
|
||||||
|
|
|
@ -22,6 +22,9 @@
|
||||||
# Select motd source
|
# Select motd source
|
||||||
if [ -f "$__object/parameter/source" ]; then
|
if [ -f "$__object/parameter/source" ]; then
|
||||||
source="$(cat "$__object/parameter/source")"
|
source="$(cat "$__object/parameter/source")"
|
||||||
|
if [ "$source" = "-" ]; then
|
||||||
|
source="${__object}/stdin"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
source="$__type/files/motd"
|
source="$__type/files/motd"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue