cdist/cdist/conf/type/__cdist_preos/manifest

50 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
#
# 2015 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/>.
#
#
destination="/$__object_id"
os=$(cat "$__global/explorer/os")
case "$os" in
archlinux)
# any linux should work
:
;;
*)
echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2
echo "Please contribute an implementation for it if you can." >&2
exit 1
;;
esac
# Our root
__directory "$destination" \
--mode 0755
for rootdir in boot bin etc lib; do
require="__directory/$destination" __directory "$destination/$rootdir" \
--mode 0755
done
require="__directory/$destination/etc" __cdistmarker \
--destination "$destination/etc/cdist-configured"