#!/bin/bash
########################################################################
# MuGLIn - MuGLIn GNU/Linux Installation		                       #
#                                                                      #
# Copyright (C) 2010 Jakob Gurnhofer <jakob.gurnhofer@gmail.com>       #
# Copyricht (C) 2010 Srdjan Markovic <smark2ki@htl.moedling.at>        #
#                                                                      #
# This file is part of MuGLIn source code.                             #
#                                                                      #
# MuGLIn 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.                                  #
#                                                                      #
# MuGLIn 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 MuGLIn. If not, see <http://www.gnu.org/licenses/>.       #
########################################################################

show_help(){
 echo "Supported options: -os, -clients, -images, -services"
}
case "$1" in
    -os)
	echo "Supported os-arguments with image_create:"
	echo -e "debootstrap\tMinimal Debian installation with debootstrap-script, with kernel"
	echo ""
    ;;
    -clients)
    ;;
    -images)
	. /etc/muglin/base.conf
	mysql -u$MYS_USER -p$MYS_PASS -D$MYS_DB -B -e"SELECT * FROM Images;"
    ;;
    -services)
	echo "MuGLIn services:"
	cat <<SERVICES
dhcp		DHCP-Server for PXE and client configuration
tftp		TFTP-Server for PXE (kernel and initrd download)
muglinclient	Communication with client
muglinwi		Web-Frontend
mysql		Database for clients, images and sessions
SERVICES
    ;;
    -h)
      show_help
      exit
    ;;
    *)
      echo "Unsupported or empty option (\"$1\").";
      show_help
      exit -1;
    ;;
esac
