#!/bin/bash
# kiwi-ltsp-static-conf - Part of KIWI-LTSP as created by Alex Savin
#
# Copyright (c) 2012 Alex Savin
# This program 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 2 of the License, or (at your option) any later
# version.
#
# This program 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
# this program; if not, see <http://www.gnu.org/licenses/>.

#======================================
# List of config files
#--------------------------------------
# TODO:  check: is it all config files?
ALL_READONLY_CONFIG_FILES="/etc/sane.d/  
	/etc/ssh/ssh_host_dsa_key.pub /etc/ssh/ssh_host_rsa_key.pub 
	/etc/ssh/ssh_host_ecdsa_key.pub  
	/etc/sysconfig/language /etc/sysconfig/keyboard /etc/sysconfig/clock" 
ALL_WRITABLE_CONFIG_FILES="/etc/dhcpd.conf /etc/exports 
	$TFTPBOOTPATH/pxelinux.cfg/ $TFTPBOOTPATH/KIWI/ /etc/xinetd.d/nbdrootd 
	/etc/xinetd.d/tftp /etc/xinetd.conf /etc/hosts.allow 
	/etc/sysconfig/dhcpd /etc/sysctl.conf 
	/etc/sysconfig/SuSEfirewall2 /etc/named.conf.include  
	/etc/sysconfig/kiwi-ltsp $KIWI_LTSP_CONF_FILE"
ALL_READONLY_CONFIG_FILES="`echo $ALL_READONLY_CONFIG_FILES | tr '[:space:]' ' '`"
ALL_WRITABLE_CONFIG_FILES="`echo $ALL_WRITABLE_CONFIG_FILES | tr '[:space:]' ' '`"
ALL_CONFIG_FILES="$ALL_WRITABLE_CONFIG_FILES $ALL_READONLY_CONFIG_FILES"

#======================================
# Comma separated list of pairs "DISTRO_NAME path-to-source"
# this will be used for autodetect distro name by source path
# TODO: add support other distros
# Note: path-to-source can be regexp, but space and comma symbols is not allowed
#--------------------------------------
DISTRO_ALIAS_ARRAY="
suse download.opensuse.org/distribution ,
suse obs://[0-9][0-9]\.[0-9]/repo/oss ,

"
DISTRO_ALIAS_ARRAY="`echo $DISTRO_ALIAS_ARRAY | tr '\n' ' '`"

#======================================
# Path to kiwi profiles dirs
#--------------------------------------
DEFAULT_KIWI_DIR="/usr/share/kiwi"
DEFAULT_PROFILES_DIR="$DEFAULT_KIWI_DIR/image/ltsp/"
DEFAULT_NETBOOT_DIR="$DEFAULT_KIWI_DIR/image/netboot/"

#======================================
# Service which kiwi-ltsp can active and restart
#--------------------------------------
KL_ALLOWED_SERVICES="klaoe xinetd nfsserver nfs-server dhcpd dnsmasq sshd named SuSEfirewall2 SuSEfirewall2_setup firewalld sysctl rpcbind epoptes-server"
