Compare commits

..

3 Commits

32 changed files with 1048 additions and 63 deletions

66
conf/amak.conf.sh Normal file
View File

@@ -0,0 +1,66 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=no
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
IPV4_IFACES="eth0 eth1"
NET4_MODE_eth0="static"
NET4_IP_eth0="10.254.1.250/24"
NET4_MODE_eth1="static"
NET4_IP_eth1="10.0.254.250/16"
NET4_GW_eth1="10.0.254.254"
NET4_NS_eth1="10.0.254.250"
NET4_NS_SEARCH_eth1=$REALM
#IPV6_IFACES="eth0"
NET6_MODE_eth0="static"
NET6_IP_eth0="2a03:7220:8085:6b01::a/64"
NET6_GW_eth0="2a03:7220:8085:6b01::1"
NET6_NS_eth0="2a03:7220:8085:6b01::a"
NET6_NS_SEARCH_eth0=$REALM
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile \
conf_syslog conf_network"

48
conf/amukta.conf.sh Normal file
View File

@@ -0,0 +1,48 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=yes
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist conf_ceph authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile patch_snmp install_mkagent \
conf_syslog conf_network"

48
conf/augustine.conf.sh Normal file
View File

@@ -0,0 +1,48 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=yes
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist conf_ceph authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile patch_snmp install_mkagent \
conf_syslog conf_network"

View File

@@ -0,0 +1,2 @@
export NTP_SERV=ntpsec

View File

@@ -17,3 +17,4 @@ export INIT_COM="$RC_SCRIPTS_PATH/%srv% %com%"
#export INIT_COM="systemctl %comm% %srv%"
# Init Upstart (plus ou moins universel)
#export INIT_COM="service %srv% %com%"

48
conf/carlisle.conf.sh Normal file
View File

@@ -0,0 +1,48 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=yes
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist conf_ceph authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile patch_snmp install_mkagent \
conf_syslog conf_network"

48
conf/dana.conf.sh Normal file
View File

@@ -0,0 +1,48 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=yes
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist conf_ceph authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile patch_snmp install_mkagent \
conf_syslog conf_network"

47
conf/fuji.conf.sh Normal file
View File

@@ -0,0 +1,47 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=no
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
#Network conf managed by proxmox
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
PKGS_RMLIST=""
PKGS_BLACKLIST=""
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist conf_locale conf_ssh \
conf_mail install_pkg install_profile" #patch_snmp install_mkagent \
#conf_syslog conf_network"

48
conf/gilbert.conf.sh Normal file
View File

@@ -0,0 +1,48 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=yes
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist conf_ceph authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile patch_snmp install_mkagent \
conf_syslog conf_network"

View File

@@ -6,8 +6,8 @@ export REALM="mixart-myrys.org"
export NTP_SERVERS="ntp1.$REALM ntp2.$REALM"
# Upgrade_dist variables
export PROXYAPT="acng.$REALM"
export PROXYAPTPORT="3142"
export PROXY_APT="acng.$REALM"
export PROXY_APT_PORT="3142"
# Authnz variables
export DEFAULT_SHELL="/bin/bash"
@@ -17,20 +17,25 @@ export LOCALESET="en_US.UTF-8 fr_FR.UTF-8"
export SYSLOCALE="fr_FR.UTF-8"
# Authentification
export BASE_DC="dc=mixart-myrys,dc=org"
export KDC_SERVER="kerb.$REALM"
export KADM_SERVER="kerb.$REALM"
export LDAP_SERVER="ldap.$REALM"
export LDAP_ADM="admin"
#export BASE_DC="dc=mixart-myrys,dc=org"
#export KDC_SERVER="kerb.$REALM"
#export KADM_SERVER="kerb.$REALM"
#export LDAP_SERVER="ldap.$REALM"
#export LDAP_ADM="admin"
# Ceph share
export CEPH_SRV_NAMES="augustine dana douglas gilbert"
export CEPHIP_augustine="10.254.1.1"
export CEPHIP_dana="10.254.1.2"
export CEPHIP_douglas="10.254.1.3"
export CEPHIP_gilbert="10.254.1.4"
export CEPH_SECRET="AQBC1MVdUl2HIBAAPT+BP6pOImuTK/0ayYDMTw=="
export SHARED_HOME="false"
#export CEPH_SRV_NAMES="augustine dana douglas gilbert"
#export CEPHIP_augustine="10.254.1.1"
#export CEPHIP_dana="10.254.1.2"
#export CEPHIP_douglas="10.254.1.3"
#export CEPHIP_gilbert="10.254.1.4"
#export CEPH_SECRET="AQBC1MVdUl2HIBAAPT+BP6pOImuTK/0ayYDMTw=="
#export SHARED_HOME="false"
# NFS
export NFS_MOUNTS="data"
export MOUNTSERV_data="10.254.1.1:/data"
export MOUNTPOINT_data="/data"
# SSH
export SSHD_PERMITROOT_RANGE="10.254.1.0/24"

View File

@@ -8,12 +8,12 @@ export PKGS_BLACKLIST="apparmor resolvconf chafa snapd"
# Base
export PKGS_BASE="debconf-utils debhelper deborphan ethtool cpufrequtils \
hwinfo lm-sensors libatasmart-bin lsscsi pciutils vim emacs-nox \
curl hwinfo lm-sensors libatasmart-bin lsscsi pciutils vim emacs-nox \
mailutils htop lsof ltrace strace bash-completion host dnsutils \
sysbench sysstat ifstat iftop iotop mtr-tiny tcpdump mc pbzip2 pigz \
xz-utils zip unzip plzip lzip ftp lftp bc dc dos2unix psmisc udunits-bin \
whois tmux screen debconf-doc dump figlet gawk gpm multitail neofetch nmap \
oping pv whois traceroute rsync tree"
oping pv whois traceroute rsync tree git qemu-guest-agent"
# Agregation of the package lists
export PKGSEL="$PKGS_BASE"

48
conf/katmai.conf.sh Normal file
View File

@@ -0,0 +1,48 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=yes
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist conf_ceph authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile patch_snmp install_mkagent \
conf_syslog conf_network"

48
conf/kiska.conf.sh Normal file
View File

@@ -0,0 +1,48 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=yes
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist conf_ceph authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile patch_snmp install_mkagent \
conf_syslog conf_network"

48
conf/mageik.conf.sh Normal file
View File

@@ -0,0 +1,48 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=yes
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist conf_ceph authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile patch_snmp install_mkagent \
conf_syslog conf_network"

48
conf/okmok.conf.sh Normal file
View File

@@ -0,0 +1,48 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=yes
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist conf_ceph authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile patch_snmp install_mkagent \
conf_syslog conf_network"

64
conf/ontake.conf.sh Normal file
View File

@@ -0,0 +1,64 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=no
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
IPV4_IFACES="eth0 eth1"
NET4_MODE_eth0="static"
NET4_IP_eth0="10.254.1.20/24"
NET4_MODE_eth1="static"
NET4_IP_eth1="10.0.254.20/16"
NET4_GW_eth1="10.0.254.254"
NET4_NS_eth1="10.0.254.250"
NET4_NS_SEARCH_eth1=$REALM
#IPV6_IFACES="eth0"
NET6_MODE_eth0="static"
NET6_IP_eth0="2a03:7220:8085:6b01::a/64"
NET6_GW_eth0="2a03:7220:8085:6b01::1"
NET6_NS_eth0="2a03:7220:8085:6b01::a"
NET6_NS_SEARCH_eth0=$REALM
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist authnz conf_locale conf_ssh conf_syslog \
conf_mail install_pkg install_profile conf_network conf_nfs"
#patch_snmp install_mkagent \

67
conf/seguam.conf.sh Normal file
View File

@@ -0,0 +1,67 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=no
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
IPV4_IFACES="eth0 eth1"
NET4_MODE_eth0="static"
NET4_IP_eth0="10.254.1.240/24"
NET4_MODE_eth1="static"
NET4_IP_eth1="10.0.254.240/16"
NET4_GW_eth1="10.0.254.254"
NET4_NS_eth1="10.0.254.250"
NET4_NS_SEARCH_eth1=$REALM
#IPV6_IFACES="eth0"
NET6_MODE_eth0="static"
NET6_IP_eth0="2a03:7220:8085:6b01::a/64"
NET6_GW_eth0="2a03:7220:8085:6b01::1"
NET6_NS_eth0="2a03:7220:8085:6b01::a"
NET6_NS_SEARCH_eth0=$REALM
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist authnz conf_locale conf_ssh conf_syslog \
conf_mail install_pkg install_profile conf_network conf_nfs"
#patch_snmp install_mkagent \

48
conf/segula.conf.sh Normal file
View File

@@ -0,0 +1,48 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=yes
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist conf_ceph authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile patch_snmp install_mkagent \
conf_syslog conf_network"

66
conf/spurr.conf.sh Normal file
View File

@@ -0,0 +1,66 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=no
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
IPV4_IFACES="eth0 eth1"
NET4_MODE_eth0="static"
NET4_IP_eth0="10.254.1.100/24"
NET4_MODE_eth1="static"
NET4_IP_eth1="10.0.254.100/16"
NET4_GW_eth1="10.0.254.254"
NET4_NS_eth1="10.0.254.250"
NET4_NS_SEARCH_eth1=$REALM
#IPV6_IFACES="eth0"
NET6_MODE_eth0="static"
NET6_IP_eth0="2a03:7220:8085:6b01::a/64"
NET6_GW_eth0="2a03:7220:8085:6b01::1"
NET6_NS_eth0="2a03:7220:8085:6b01::a"
NET6_NS_SEARCH_eth0=$REALM
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile conf_nfs"
#conf_syslog conf_network"

66
conf/trident.conf.sh Normal file
View File

@@ -0,0 +1,66 @@
# Fichier de configuration principal
# ------------------------------------------------------------------------------
# -------------------- Importation de paramêtres globaux -----------------------
# ------------------------------------------------------------------------------
# Importe les paramètres geoffray-levasseur.org
. $MYPATH/conf/includes/mam.conf.sh
# Importe la sélection de paquets par défaut
. $MYPATH/conf/includes/pkgsel.base.conf.sh
# Les paramètres précédemment importés sont surchargeable après cette ligne
# ------------------------------------------------------------------------------
# ------------------------------ General Section -------------------------------
# ------------------------------------------------------------------------------
# User of the machine (must exists)
MAINUSER=root
# Pilotes X11 non libre à installer ?
#X11_DRV="virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Authentication: use LDAP+Kerberos ?
WITH_LDAP_KERB=no
# Users to create, add or remove
REMOVE_USERS=fatal
# Network
IPV4_IFACES="eth0 eth1"
NET4_MODE_eth0="static"
NET4_IP_eth0="10.254.1.70/24"
NET4_MODE_eth1="static"
NET4_IP_eth1="10.0.254.70/16"
NET4_GW_eth1="10.0.254.254"
NET4_NS_eth1="10.0.254.250"
NET4_NS_SEARCH_eth1=$REALM
#IPV6_IFACES="eth0"
NET6_MODE_eth0="static"
NET6_IP_eth0="2a03:7220:8085:6b01::a/64"
NET6_GW_eth0="2a03:7220:8085:6b01::1"
NET6_NS_eth0="2a03:7220:8085:6b01::a"
NET6_NS_SEARCH_eth0=$REALM
# Mode d'installation :
# * dev : installe les paquets un par un avec apt (lent)
# * full : envoie d'un seul coup la liste de tous les paquets à apt (rapide)
INTALL_MODE=full
# Paquets additionnels
PKGSEL="$PKGSEL"
# ------------------------------------------------------------------------------
# -------------------------- Section modules d'init ----------------------------
# ------------------------------------------------------------------------------
# Liste des modules à executer (surchargeable en ligne de commande)
MODULE_LIST="conf_ntp upgrade_dist authnz conf_locale conf_ssh \
conf_mail install_pkg install_profile \
conf_syslog conf_network"

View File

@@ -32,7 +32,9 @@ chroot_bootstrap()
cp -av $bootstrap_items $tmpdir
prnt I "Changing root and starting a fork of init.sh..."
chroot $CHROOT_PATH /bin/bash -c 'CHROOT_DONE=true; $tmpdir/init.sh $@'
# on the following line, true allows to correctly exit in case of error since
# errors are managed by the chrooted environment
chroot $CHROOT_PATH /bin/bash -c 'CHROOT_DONE=true; $tmpdir/init.sh $@' || true
# If stage file still exists we copy it to be able to resume later
if [[ -e $tmpdir/$(basename $STAGE_FILE) ]]; then

View File

@@ -140,7 +140,7 @@ read_commandline()
syntax_error
fi
unset want_conffile want_logfile want_module
unset want_conffile want_logfile want_module want_chroot
}
export -f read_commandline
@@ -165,8 +165,8 @@ process_commandline_and_vars()
prnt E "Resuming doesn't make sense with --check-only."
die 1 --force
fi
if [[ $MANUAL_MODULE_LIST ]]; then
prnt E "Recovery mode can't work with a manual module list."
if [[ -n $MANUAL_MODULE_LIST ]]; then
prnt E "Resume mode can't work with a manual module list."
die 1 --force
fi
fi

View File

@@ -148,8 +148,7 @@ export -f separator
dsleep()
{
i=$1
while test $i -gt 0
do
while test $i -gt 0; do
if [[ -n $2 ]]; then
echo -n "$2"
else

View File

@@ -10,9 +10,12 @@
# Some useful variables:
export HOST_REPO_PATH=${HOST_REPO_PATH:-"$MYPATH/repo/hosts/$HOSTNAME"}
export GROUP_REPO_PATH=${GROUP_REPO_PATH:-"$MYPATH/repo/groups"}
export COMM_REPO_PATH=${COMM_REPO_PATH:-"$MYPATH/repo/common"}
export HOST_REPO_PATH=${HOST_REPO_PATH:-"$MYPATH/repo/hosts/$HOSTNAME"}
export REALM_REPO_PATH=${REALM_REPO_PATH:-"$MYPATH/repo/realms/$REALM"}
export GROUP_REPO_PATH=${GROUP_REPO_PATH:-"$MYPATH/repo/groups/$GROUPNAME"}
export RLMGRP_REPO_PATH=${RLMGRP_REPO_PATH:-"$MYPATH/repo/realms/$REALM/groups/$GROUPNAME"}
export RLMHST_REPO_PATH=${RLMHST_REPO_PATH:-"$MYPATH/repo/realms/$REALM/hosts/$HOSTNAME"}
export COMM_REPO_PATH=${COMM_REPO_PATH:-"$MYPATH/repo/common"}
# ------------------------------------------------------------------------------
@@ -40,10 +43,10 @@ backup_dist()
die 12
fi
elif [[ -d ${file} ]]; then
prnt I "Creation a backup of the directory ${file} on $tmstmp..."
prnt I "Creating a backup of the directory ${file} on $tmstmp..."
cp -av $file ${file}.dist.${tmstmp}
if [[ $? -ne 0 ]]; then
prnt E "backup_dist(): Failed copyind directory recursively."
prnt E "backup_dist(): Failed copying directory recursively."
die 12
fi
else
@@ -58,11 +61,26 @@ export -f backup_dist
# ------------------------------------------------------------------------------
# Select source file according to our priority mechanism
# 1) repo/<realm>/hosts/<hostname>/ => specific hostname in specific realm
# 2) repo/<realm>/groups/<groupname>/ => specific group in specific realm
# 3) repo/hosts/<hostname>/ => specific hostname in any realm
# 4) repo/groups/<groupname>/ => specific group in any realm
# 5) repo/<realm>/ => any hostname in specific realm
# 6) repo/common => any hostname any realm
# Note: if a specific hostname is provided it makes unecessary to find a group.
select_file()
{
local infile=$1
if [[ -f $HOST_REPO_PATH/$infile ]]; then
if [[ -f $RLMHST_REPO_PATH/$infile ]]; then
local source="$RLMHST_REPO_PATH/$infile"
elif [[ -f $RLMGRP_REPO_PATH/$infile ]]; then
local source="$RLMGRP_REPO_PATH/$infile"
elif [[ -f $HOST_REPO_PATH/$infile ]]; then
local source="$HOST_REPO_PATH/$infile"
elif [[ -f $GROUP_REPO_PATH/$infile ]]; then
local source="$GROUP_REPO_PATH/$infile"
elif [[ -f $REALM_REPO_PATH/$infile ]]; then
local source="$REALM_REPO_PATH/$infile"
elif [[ -f $COMM_REPO_PATH/$infile ]]; then
local source="$COMM_REPO_PATH/$infile"
else
@@ -77,12 +95,20 @@ export -f select_file
# ------------------------------------------------------------------------------
# Select source directory according to our priority mechanism
# Select source directory according to our priority mechanism (same as above)
select_directory()
{
local indir=$1
if [[ -d $HOST_REPO_PATH/$indir ]]; then
if [[ -d $RLMHST_REPO_PATH/$indir ]]; then
local source="$RLMHST_REPO_PATH/$indir"
elif [[ -d $RLMGRP_REPO_PATH/$indir ]]; then
local source="$RLMGRP_REPO_PATH/$indir"
elif [[ -d $HOST_REPO_PATH/$indir ]]; then
local source="$HOST_REPO_PATH/$indir"
elif [[ -d $GROUP_REPO_PATH/$indir ]]; then
local source="$GROUP_REPO_PATH/$indir"
elif [[ -d $REALM_REPO_PATH/$indir ]]; then
local source="$REALM_REPO_PATH/$indir"
elif [[ -d $COMM_REPO_PATH/$indir ]]; then
local source="$COMM_REPO_PATH/$indir"
else
@@ -116,19 +142,16 @@ install_file()
local arg=
for arg in $@; do
filelist="$filelist $(select_file $arg)"
# We always replace until the last argument being the target
target="$arg"
done
unset arg
# Empty to just obtain the target which is the last element of the list
local file=
for file in $filelist; do
:
done
if [[ ! $file == /* ]]; then
if [[ ! $target == /* ]]; then
prnt E "install_file(): Target must be on the root filesystem and full path must be provided."
die 13
fi
unset file
unset target
if [[ -d $(dirname $i) ]]; then
prnt I "Creating required target directory $(dirname $i)..."
@@ -152,14 +175,19 @@ export -f install_file
# Add the content of a file at the end of an other
append_file()
{
if [[ $# -ne 2 ]]; then
prnt E "append_file(): Two arguments are required, source and destination."
die 11
fi
local srcfile=$(select_file $1)
local dstfile=$2
if [[ -e $dstfile ]]; then
if [[ ! $dstfile == /* ]]; then
prnt E "append_file(): Target must be on the root filesystem and full path must be provided."
die 13
fi
if [[ ! $dstfile == /* ]]; then
prnt E "append_file(): Target file must exist."
if [[ -e $dstfile ]]; then
prnt E "append_file(): Target file must exist (use touch first to create it if required)."
die 13
fi
@@ -303,6 +331,7 @@ directory_exists()
}
export -f directory_exists
# ------------------------------------------------------------------------------
# check if file exists and return error if not
directory_must_exists()
@@ -315,7 +344,7 @@ directory_must_exists()
fi
unset md
}
export -f directory_must_exists
# EOF

View File

@@ -53,8 +53,9 @@ export -f load_autoconf
# ------------------------------------------------------------------------------
# Load configuration with the following priorities:
# 1) Those given on command line, if any
# 2) <workingdir>/conf/<hostname>.conf (Hostname based and specific)
# 3) <workingdir>/conf/init.conf.sh (Generic default)
# 2) <workingdir>/conf/<realm>/<hostname>.conf (Hostname based and specific)
# 2) <workingdir>/conf/<hostname>.conf (Hostname based and specific)
# 3) <workingdir>/conf/init.conf.sh (Generic default, for testing)
load_configuration()
{
if [[ -n $CONFFILES ]]; then
@@ -71,7 +72,10 @@ load_configuration()
unset f
else
prnt I "Loading configuration..."
if [[ -e $MYPATH/conf/$HOSTNAME.conf.sh ]]; then
if [[ -e $MYPATH/conf/$REALM/$HOSTNAME.conf.sh ]]; then
prnt I "A specific configuration will be used."
. $MYPATH/conf/$HOSTNAME.conf.sh
elif [[ -e $MYPATH/conf/$HOSTNAME.conf.sh ]]; then
prnt I "A specific configuration will be used."
. $MYPATH/conf/$HOSTNAME.conf.sh
else

View File

@@ -38,7 +38,9 @@ get_os_version()
fi
# Return values on stdout
echo ${ID,,} ${VERSION_ID} ${VERSION_CODENAME,,}
echo ${ID,,} ${VERSION_ID} $(echo ${VERSION_CODENAME,,} | awk '{print $1}')
)
}
export read_os_release

View File

@@ -21,7 +21,7 @@
# ------------------------------------------------------------------------------
export VER_conf_network="0.0.8"
export DEP_conf_network="install_pkg"
export DEP_conf_network=""
conf_network()
{
@@ -100,6 +100,9 @@ conf_network()
fi
done
prnt I "Trying to raise down iface up. Allready configured iface will require a reboot"
ifup -a || true && prnt W "Ignoring errors here."
unset iface if_file
NEED_REBOOT=true
}

51
modules/conf_nfs.sh Normal file
View File

@@ -0,0 +1,51 @@
# ------------------------------------------------------------------------------
# Description of module conf_nfs
# Copyright (c) Year Your Name <your.mail@host.tld>
# ------------------------------------------------------------------------------
# <Licence header compatible with BSD-3 licence, you want to use>
# ------------------------------------------------------------------------------
# Variable list:
# * <VARNAME>: role explaination
# ------------------------------------------------------------------------------
# Module version
export VER_conf_nfs="0.0.1"
# Module's code
conf_nfs()
{
pkginst nfs-common
for mnt in $NFS_MOUNTS; do
if [[ ! $(grep "$(eval echo \$MOUNTSERV_$mnt)/d" /etc/fstab) ]]; then
echo -e "$(eval echo \$MOUNTSERV_$mnt)\t$(eval echo \$MOUNTPOINT_$mnt)\tnfs4\tdefaults,_netdev\t0\t0" >> /etc/fstab
fi
if [[ ! -d $(eval echo \$MOUNTPOINT_$mnt) ]]; then
mkdir -pv $(eval echo \$MOUNTPOINT_$mnt)
fi
mount $(eval echo \$MOUNTPOINT_$mnt)
done
}
# Preliminary checks code for the module
precheck_conf_nfs()
{
if [[ -n $NFS_MOUNTS ]]; then
for mnt in $NFS_MOUNTS; do
if [[ -z $(eval echo \$MOUNTSERV_$mnt) ]]; then
prnt E "The server mount for $NFS_MOUNT is not declared."
die 182
fi
if [[ -z $(eval echo \$MOUNTPOINT_$mnt) ]]; then
prnt E "The mountpoint for $NFS_MOUNT is not declared."
die 183
fi
prnt I "NFS server $(eval echo \$MOUNTSERV_$mnt) will be mounted on $(eval echo \$MOUNTPOINT_$mnt)."
done
fi
}
# Public functions might be exported
export -f conf_nfs
export -f precheck_conf_nfs
# EOF

View File

@@ -24,23 +24,37 @@ conf_ntp()
prnt I "Installing ntp daemon..."
pkginst ntp
prnt I "Stopping service ntp..."
svc_stop ntp
if [[ -n $NTP_SERV ]]; then
svc_stop $NTP_SERV
else
svc_stop ntp
fi
if [[ -n $NTP_SERV ]]; then
local conf_file="/etc/$NTP_SERV/ntp.conf"
else
local conf_file="/etc/ntp.conf"
fi
prnt I "Installing NTP configuration file..."
local dest="/etc/ntp.conf.work"
backup_dist /etc/ntp.conf
tag_file $dest
local dest="${conf_file}.work"
backup_dist $conf_file
install_file ntp.conf $dest
tag_file $dest
local line=""
for srv in $NTP_SERVERS; do
line="${line}server $srv iburst\n"
done
sed -i -e "s/@SERVERLIST@/$line/" $dest &&
echo "# Generated on $(stdtime)" >> $dest &&
mv -fv $dest /etc/ntp.conf
mv -fv $dest $conf_file
prnt I "Starting service ntp..."
svc_start ntp
if [[ -n $NTP_SERV ]]; then
svc_start $NTP_SERV
else
svc_start ntp
fi
sleep 2 # short sleep so we're sure daemon is ready
ntptime
}

View File

@@ -8,7 +8,7 @@
# https://opensource.org/licenses/BSD-3-Clause
# ------------------------------------------------------------------------------
export VER_install_profile="0.0.7"
export VER_install_profile="0.1.0"
export DEP_install_profile="install_pkg"
install_profile()
@@ -23,11 +23,19 @@ install_profile()
for usr in $usrlist; do
prnt I "Installing profile for user $usr..."
backup_dist $usr/{.,}profile $usr/.bashrc
install_file profile/{{.,}profile,.bashrc} $usr/
tag_file $usr/{{.,}profile,.bashrc}
install_file profile/.tmux/.tmux.conf{,.local} $usr/
tag_file $usr/.tmux.conf{,.local}
backup_dist $usr/{.profile,.bashrc}
install_file profile/{.profile,.bashrc} $usr/
tag_file $usr/{.profile,.bashrc}
#install_file profile/.tmux/.tmux.conf{,.local} $usr/
#tag_file $usr/.tmux.conf{,.local}
if [[ ! -d $usr/profile ]]; then
(
cd $usr
git config --global http.sslverify false
git clone https://git.geoffray-levasseur.org/fatalerrors/profile.git
git config --global http.sslverify true
)
fi
done
unset usrlist
@@ -39,7 +47,7 @@ install_profile()
precheck_install_profile()
{
file_must_exists profile/{motd,{.,}profile,.bashrc,.tmux/.tmux.conf{,.local}}
file_must_exists profile/{motd,{.profile,.bashrc,.tmux/.tmux.conf{,.local}}
}
export -f install_profile

View File

@@ -0,0 +1,9 @@
#
deb http://fr.deb.devuan.org/merged daedalus main contrib non-free
deb-src http://fr.deb.devuan.org/merged daedalus main contrib non-free
#deb http://fr.deb.devuan.org/merged daedalus-updates main contrib non-free
#deb-src http://fr.deb.devuan.org/merged daedalus-updates main contrib non-free
#deb http://fr.deb.devuan.org/merged daedalus-backports main contrib non-free
#deb-src http://fr.deb.devuan.org/merged daedalus-backports main contrib non-free

View File

@@ -112,4 +112,4 @@ if ! shopt -oq posix; then
fi
fi
. ~/profile
PROFILE_PATH=~/profile . ~/profile/profile.sh