forked from ungleich-public/cdist
Adding suuport for OS Devuan
This commit is contained in:
parent
b12df5f125
commit
1882040a25
21 changed files with 29 additions and 21 deletions
|
@ -49,6 +49,11 @@ if [ -f /etc/debian_version ]; then
|
||||||
echo debian
|
echo debian
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/devuan_version ]; then
|
||||||
|
echo devuan
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
###
|
###
|
||||||
|
|
||||||
if [ -f /etc/gentoo-release ]; then
|
if [ -f /etc/gentoo-release ]; then
|
||||||
|
|
|
@ -33,6 +33,9 @@ case "$($__explorer/os)" in
|
||||||
debian)
|
debian)
|
||||||
cat /etc/debian_version
|
cat /etc/debian_version
|
||||||
;;
|
;;
|
||||||
|
devuan)
|
||||||
|
cat /etc/devuan_version
|
||||||
|
;;
|
||||||
fedora)
|
fedora)
|
||||||
cat /etc/fedora-release
|
cat /etc/fedora-release
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian)
|
ubuntu|debian|devuan)
|
||||||
# No stinking recommends thank you very much.
|
# No stinking recommends thank you very much.
|
||||||
# If I want something installed I will do so myself.
|
# If I want something installed I will do so myself.
|
||||||
__file /etc/apt/apt.conf.d/99-no-recommends \
|
__file /etc/apt/apt.conf.d/99-no-recommends \
|
||||||
|
|
|
@ -35,7 +35,7 @@ has_hostnamectl=$(cat "$__object/explorer/has_hostnamectl")
|
||||||
# If everything is ok -> exit
|
# If everything is ok -> exit
|
||||||
#
|
#
|
||||||
case "$os" in
|
case "$os" in
|
||||||
archlinux|debian|suse|ubuntu)
|
archlinux|debian|suse|ubuntu|devuan)
|
||||||
if [ "$name_config" = "$name_should" -a "$name_running" = "$name_should" ]; then
|
if [ "$name_config" = "$name_should" -a "$name_running" = "$name_should" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -60,7 +60,7 @@ if [ "$has_hostnamectl" ]; then
|
||||||
echo "hostnamectl set-hostname '$name_should'"
|
echo "hostnamectl set-hostname '$name_should'"
|
||||||
else
|
else
|
||||||
case "$os" in
|
case "$os" in
|
||||||
archlinux|debian|ubuntu)
|
archlinux|debian|ubuntu|devuan)
|
||||||
echo "hostname '$name_should'"
|
echo "hostname '$name_should'"
|
||||||
echo "printf '%s\n' '$name_should' > /etc/hostname"
|
echo "printf '%s\n' '$name_should' > /etc/hostname"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -34,7 +34,7 @@ not_supported() {
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
archlinux|debian|suse|ubuntu)
|
archlinux|debian|suse|ubuntu|devuan)
|
||||||
# handled in gencode-remote
|
# handled in gencode-remote
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -26,7 +26,7 @@ os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
debian)
|
debian|devuan)
|
||||||
# Debian needs a seperate package
|
# Debian needs a seperate package
|
||||||
__package locales --state present
|
__package locales --state present
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
debian|ubuntu)
|
debian|ubuntu|devuan)
|
||||||
|
|
||||||
# Debian and Ubuntu need to be updated,
|
# Debian and Ubuntu need to be updated,
|
||||||
# as seen in /etc/init.d/bootlogs
|
# as seen in /etc/init.d/bootlogs
|
||||||
echo "uname -snrvm > /var/run/motd"
|
echo "uname -snrvm > /var/run/motd"
|
||||||
|
|
|
@ -30,7 +30,7 @@ os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
debian|ubuntu)
|
debian|ubuntu|devuan)
|
||||||
destination=/etc/motd.tail
|
destination=/etc/motd.tail
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -32,7 +32,7 @@ else
|
||||||
case "$os" in
|
case "$os" in
|
||||||
amazon|centos|fedora|redhat) type="yum" ;;
|
amazon|centos|fedora|redhat) type="yum" ;;
|
||||||
archlinux) type="pacman" ;;
|
archlinux) type="pacman" ;;
|
||||||
debian|ubuntu) type="apt" ;;
|
debian|ubuntu|devuan) type="apt" ;;
|
||||||
freebsd)
|
freebsd)
|
||||||
if [ -n "$(cat "$__object/explorer/pkgng_exists")" ]; then
|
if [ -n "$(cat "$__object/explorer/pkgng_exists")" ]; then
|
||||||
type="pkgng_freebsd"
|
type="pkgng_freebsd"
|
||||||
|
|
|
@ -30,7 +30,7 @@ else
|
||||||
os="$(cat "$__global/explorer/os")"
|
os="$(cat "$__global/explorer/os")"
|
||||||
case "$os" in
|
case "$os" in
|
||||||
amazon|centos|fedora|redhat) type="yum" ;;
|
amazon|centos|fedora|redhat) type="yum" ;;
|
||||||
debian|ubuntu) type="apt" ;;
|
debian|ubuntu|devuan) type="apt" ;;
|
||||||
archlinux) type="pacman" ;;
|
archlinux) type="pacman" ;;
|
||||||
*)
|
*)
|
||||||
echo "Don't know how to manage packages on: $os" >&2
|
echo "Don't know how to manage packages on: $os" >&2
|
||||||
|
|
|
@ -31,7 +31,7 @@ else
|
||||||
os="$(cat "$__global/explorer/os")"
|
os="$(cat "$__global/explorer/os")"
|
||||||
case "$os" in
|
case "$os" in
|
||||||
amazon|centos|fedora|redhat) type="yum" ;;
|
amazon|centos|fedora|redhat) type="yum" ;;
|
||||||
debian|ubuntu) type="apt" ;;
|
debian|ubuntu|devuan) type="apt" ;;
|
||||||
archlinux) type="pacman" ;;
|
archlinux) type="pacman" ;;
|
||||||
*)
|
*)
|
||||||
echo "Don't know how to manage packages on: $os" >&2
|
echo "Don't know how to manage packages on: $os" >&2
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux|suse|centos)
|
ubuntu|debian|archlinux|suse|centos|devuan)
|
||||||
__package postfix --state present
|
__package postfix --state present
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux|centos)
|
ubuntu|debian|archlinux|centos|devuan)
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
os=$("$__explorer/os")
|
os=$("$__explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux|suse|centos)
|
ubuntu|debian|archlinux|suse|centos|devuan)
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux|suse|centos)
|
ubuntu|debian|archlinux|suse|centos|devuan)
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux|centos)
|
ubuntu|debian|archlinux|centos|devuan)
|
||||||
echo "postfix reload"
|
echo "postfix reload"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -37,7 +37,7 @@ if [ "$init" = 'systemd' ]; then
|
||||||
|
|
||||||
else
|
else
|
||||||
case "$os" in
|
case "$os" in
|
||||||
debian|openwrt)
|
debian|openwrt|devuan)
|
||||||
state="present"
|
state="present"
|
||||||
[ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent"
|
[ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -24,7 +24,7 @@ timezone="$__object_id"
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian)
|
ubuntu|debian|devuan)
|
||||||
echo "echo \"$timezone\" > /etc/timezone"
|
echo "echo \"$timezone\" > /etc/timezone"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -26,7 +26,7 @@ timezone="$__object_id"
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
archlinux|debian|ubuntu)
|
archlinux|debian|ubuntu|devuan)
|
||||||
__package tzdata
|
__package tzdata
|
||||||
export require="__package/tzdata"
|
export require="__package/tzdata"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux)
|
ubuntu|debian|archlinux|devuan)
|
||||||
__package autofs --state present
|
__package autofs --state present
|
||||||
__start_on_boot autofs --state present
|
__start_on_boot autofs --state present
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -28,7 +28,7 @@ not_supported() {
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux)
|
ubuntu|debian|archlinux|devuan)
|
||||||
echo "pkill -HUP automount"
|
echo "pkill -HUP automount"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue