begin to migrate from plural to singular, CONSISTENTLY
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
39b2976f9a
commit
238b5119eb
23 changed files with 17 additions and 24 deletions
22
conf/explorer/hostname
Executable file
22
conf/explorer/hostname
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
|
||||
hostname
|
||||
40
conf/explorer/os
Executable file
40
conf/explorer/os
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# All os variables are lower case
|
||||
#
|
||||
#
|
||||
|
||||
# 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/debian_version ] && echo debian
|
||||
|
||||
[ -f /etc/gentoo-release ] && echo gentoo
|
||||
|
||||
[ -f /etc/redhat-release ] && echo redhat
|
||||
|
||||
# ensure correct exit, otherwise other explorer won't get started
|
||||
exit 0
|
||||
32
conf/explorer/pkg_system
Executable file
32
conf/explorer/pkg_system
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2010 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
|
||||
os="$("$__explorers/os")"
|
||||
|
||||
case "$os" in
|
||||
archlinux) echo pacman ;;
|
||||
debian|ubuntu) echo apt ;;
|
||||
gentoo) echo emerge ;;
|
||||
*)
|
||||
echo "Unknown OS: $os" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue