Introduzione

Lo script si divide in più modili specifi di ogni tipologia di installazione. Si consiglia di scaricarli tutti nel dubbio.

Lista file:

I file in dettaglio

Rinstaller

   1 #!/bin/bash
   2  
   3 #   rinstaller.sh - helper in configuring a Debian box system
   4 #
   5 #   rinstaller - risca's installer (or re-install again and again the system)
   6 #   A set of scripts to automate installation of Servers on Debian
   7 #   (c) 2012 Risca - risca.eu
   8 #
   9 #   This file is part of rinstaller.
  10 #
  11 #   rinstaller is free software: you can redistribute it and/or modify
  12 #   it under the terms of the GNU General Public License as published by
  13 #   the Free Software Foundation, either version 3 of the License, or
  14 #   (at your option) any later version.
  15 #
  16 #   rinstaller is distributed in the hope that it will be useful,
  17 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
  18 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19 #   GNU General Public License for more details.
  20 #
  21 #   You should have received a copy of the GNU General Public License
  22 #   along with rinstaller.  If not, see <http://www.gnu.org/licenses/>.
  23 #
  24 #   Version 0.1
  25  
  26  
  27 #=== FUNCTION =================================================================
  28 #
  29 #        NAME: mainmenu
  30 # DESCRIPTION: start the application and get the main configuration options
  31 # PARAMETER 1: none
  32 #===============================================================================
  33 function mainmenu {
  34   whiptail --title "Welcome to rinstaller!" --msgbox \
  35 "RINSTALLER is the Risca's INSTALLER of Debian!\n\n\
  36 All what you need is a minimal installation (even without any taskel software \
  37 selection) and all the rest will be done by this script.\nJust answer a few questions \
  38 and let it configure the machine accordingly the Risca's style.\n\n\n\
  39          Have a nice new Debian BOX!!!" 25 80
  40   cmd1=(whiptail --title "Type of installation" --checklist "Choose what type of setup\
  41  do you need" 20 78 10)
  42   opt1=(BASIC "Basic sistem (required)"  ON         \
  43         SERVER    "Basic program for a server installation" OFF  \
  44         NOTEBOOK  "Notebook utility (like power saving)" OFF     \
  45         DESKTOP   "Basic program for a Desktop" OFF)
  46   configuration1=$("${cmd1[@]}" "${opt1[@]}" 2>&1 >/dev/tty )
  47   echo $configuration1
  48   case "${configuration1[@]}" in *"DESKTOP"* )
  49     cmd2=(whiptail --title "Desktop Enviroment" --checklist \
  50          "Choose your Desktop Enviroment:" 20 78 10)
  51     opt2=(KDE_BASE     "Kool Desktop Enviroment - Only base components" OFF  \
  52           KDE_FULL     "Full KDE enviroment" OFF           \
  53           GNOME        "GNOME: are you really sure?" OFF   \
  54           I3           "i3" ON                             \
  55           KDE_NET      "KDE for netbooks" OFF              \
  56           Illume       "Enlightment 17" OFF)
  57     configuration2="${configuration[@]}"$("${cmd2[@]}" "${opt2[@]}" 2>&1 >/dev/tty );; esac
  58   echo "You have selected $configuration2"
  59   CONFIG=( ${configuration1} ${configuration2} );
  60   echo ${CONFIG[@]}
  61 }
  62  
  63 function start_config {
  64   case "${CONFIG[@]}" in *"BASIC"* ) bash ./base.sh ;;
  65   esac
  66   case "${CONFIG[@]}" in *"DESKTOP"* ) bash ./desktop.sh ;;
  67   esac
  68   case "${CONFIG[@]}" in *"I3"* ) bash ./i3.sh ;;
  69   esac
  70 }
  71  
  72 function byebye {
  73   whiptail --title "Goodbye" --msgbox "Please enjoy your new Debian box at risca's style!" 25 80
  74 }
  75  
  76  
  77 mainmenu
  78 start_config
  79 byebye

Base

   1 #!/bin/bash
   2  
   3 #   base.sh - is part of ritaller.sh, the helper in configuring a Debian box
   4 #   system
   5 #
   6 #   rinstaller - risca's installer (or re-install again and again the system)
   7 #   A set of scripts to automate installation of Servers on Debian
   8 #   (c) 2012 Risca - risca.eu
   9 #
  10 #   This file is part of rinstaller.
  11 #
  12 #   rinstaller is free software: you can redistribute it and/or modify
  13 #   it under the terms of the GNU General Public License as published by
  14 #   the Free Software Foundation, either version 3 of the License, or
  15 #   (at your option) any later version.
  16 #
  17 #   rinstaller is distributed in the hope that it will be useful,
  18 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
  19 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20 #   GNU General Public License for more details.
  21 #
  22 #   You should have received a copy of the GNU General Public License
  23 #   along with rinstaller.  If not, see <http://www.gnu.org/licenses/>.
  24 #
  25 #   Version 0.1
  26  
  27  
  28 #=== FUNCTION =================================================================
  29 #
  30 #        NAME: mainmenu
  31 # DESCRIPTION: start the application and get the main configuration options
  32 # PARAMETER 1: none
  33 #===============================================================================
  34  
  35 function install_pkg {
  36   aptitude install ~pstandard ~pimportant ~prequired
  37 }
  38  
  39 function configure {
  40   # VIM
  41   sed -i -e 's/\"syntax on/syntax on/g' /etc/vim/vimrc
  42 }
  43  
  44 install_pkg
  45 configure

Gli altri

Al momento non sono più stati sviluppati: il problema della configurazione è stato risolto ricorrendo a saltstack.

MyWiki: DebInstall/scripts (last edited 2015-02-17 20:38:59 by risca)