#!/bin/bash
# Filename:      ${GRML_FAI_CONFIG}/scripts/GRMLBASE/01-autoconfig
# Purpose:       Install grml-autoconfig
# Authors:       grml-team (grml.org)
# Bug-Reports:   see http://grml.org/bugs/
# License:       This file is licensed under the GPL v2 or any later version.
################################################################################

set -u
set -e

# FAI sets $target, but shellcheck does not know that.
target=${target:?}

fcopy -M -v /etc/grml/autoconfig.local
fcopy -M -v /etc/grml/autoconfig
fcopy -M -v /etc/grml/partconf

fcopy -M -v /usr/lib/modules-load.d/grml-autoconfig.conf
fcopy -M -v /usr/lib/systemd/system/grml-autoconfig.service
fcopy -M -v /usr/share/grml-autoconfig/autoconfig.functions

fcopy -m root,root,0755 /usr/share/grml-autoconfig/grml-autoconfig
fcopy -m root,root,0644 /usr/share/grml-autoconfig/language-functions
fcopy -m root,root,0755 /usr/share/grml-autoconfig/run-screen
fcopy -m root,root,0755 /usr/share/grml-autoconfig/run-welcome
fcopy -m root,root,0755 -v /usr/bin/restore-config
fcopy -m root,root,0755 -v /usr/bin/save-config
fcopy -m root,root,0755 -v /usr/sbin/grml-autoconfig
fcopy -m root,root,0755 -v /usr/sbin/grml-hostname

fcopy -m root,root,0755 /usr/bin/grml-lang
fcopy -m root,root,0644 /usr/share/man/man1/grml-lang.1
fcopy -m root,root,0644 /usr/share/zsh/vendor-completions/_grml-lang

fcopy -m root,root,0755 /usr/sbin/grml-setlang
fcopy -m root,root,0644 /usr/share/man/man8/grml-setlang.8
fcopy -m root,root,0644 /usr/share/zsh/vendor-completions/_grml-setlang

fcopy -m root,root,0755 /usr/bin/grml-info

## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
