restructure explorer

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-02 22:24:21 +01:00
commit d171ad5e64
5 changed files with 16 additions and 19 deletions

View file

@ -19,7 +19,4 @@
#
#
cdist_explore_hostname()
{
hostname
}
hostname

View file

@ -22,18 +22,14 @@
#
#
cdist_explore_os()
{
# Ubuntu is also Debian, thus return if Ubuntu was found
if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then
echo ubuntu
return
fi
# Ubuntu is also Debian, thus return if Ubuntu was found
if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then
echo ubuntu
exit 0
fi
[ -f /etc/arch-release ] && echo archlinux
[ -f /etc/arch-release ] && echo archlinux
[ -f /etc/debian_version ] && echo debian
[ -f /etc/debian_version ] && echo debian
[ -f /etc/redhat-release ] && echo redhat
}
[ -f /etc/redhat-release ] && echo redhat