forked from ungleich-public/cdist
adding support for amazon linux
This commit is contained in:
parent
8447702c50
commit
211ee5b043
4 changed files with 10 additions and 2 deletions
|
@ -75,6 +75,11 @@ if [ -f /etc/cdist-preos ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if grep -q ^Amazon /etc/system-release 2>/dev/null; then
|
||||||
|
echo amazon
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
uname_s="$(uname -s)"
|
uname_s="$(uname -s)"
|
||||||
|
|
||||||
# Assume there is no tr on the client -> do lower case ourselves
|
# Assume there is no tr on the client -> do lower case ourselves
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
case "$($__explorer/os)" in
|
case "$($__explorer/os)" in
|
||||||
|
amazon)
|
||||||
|
cat /etc/system-release
|
||||||
|
;;
|
||||||
archlinux)
|
archlinux)
|
||||||
# empty, but well...
|
# empty, but well...
|
||||||
cat /etc/arch-release
|
cat /etc/arch-release
|
||||||
|
|
|
@ -33,7 +33,7 @@ else
|
||||||
archlinux) type="pacman" ;;
|
archlinux) type="pacman" ;;
|
||||||
debian|ubuntu) type="apt" ;;
|
debian|ubuntu) type="apt" ;;
|
||||||
gentoo) type="emerge" ;;
|
gentoo) type="emerge" ;;
|
||||||
fedora|redhat|centos) type="yum" ;;
|
fedora|redhat|centos|amazon) type="yum" ;;
|
||||||
*)
|
*)
|
||||||
echo "Don't know how to manage packages on: $os" >&2
|
echo "Don't know how to manage packages on: $os" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -29,7 +29,7 @@ fi
|
||||||
|
|
||||||
state="$(cat "$__object/parameter/state")"
|
state="$(cat "$__object/parameter/state")"
|
||||||
|
|
||||||
if grep -q -E "(centos|redhat)" "$__global/explorer/os"; then
|
if grep -q -E "(centos|redhat|amazon)" "$__global/explorer/os"; then
|
||||||
opts="-y --quiet"
|
opts="-y --quiet"
|
||||||
else
|
else
|
||||||
opts="--assumeyes --quiet"
|
opts="--assumeyes --quiet"
|
||||||
|
|
Loading…
Reference in a new issue