From c2751bf9eb4e96c2f9441a286a8367b5b54952df Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Fri, 5 May 2023 19:06:07 +0200 Subject: [PATCH] new conf files + fix bug in conf_ntp with devuan 5, fix a bug with early debian/devuan version, added git support for profile --- conf/amak.conf.sh | 66 ++++++++++++++++++++++++++++++ conf/amukta.conf.sh | 48 ++++++++++++++++++++++ conf/augustine.conf.sh | 48 ++++++++++++++++++++++ conf/auto/devuan-5.conf.sh | 2 + conf/auto/devuan.conf.sh | 1 + conf/carlisle.conf.sh | 48 ++++++++++++++++++++++ conf/dana.conf.sh | 48 ++++++++++++++++++++++ conf/fuji.conf.sh | 47 ++++++++++++++++++++++ conf/gilbert.conf.sh | 48 ++++++++++++++++++++++ conf/includes/mam.conf.sh | 33 ++++++++------- conf/includes/pkgsel.base.conf.sh | 4 +- conf/katmai.conf.sh | 48 ++++++++++++++++++++++ conf/kiska.conf.sh | 48 ++++++++++++++++++++++ conf/mageik.conf.sh | 48 ++++++++++++++++++++++ conf/okmok.conf.sh | 48 ++++++++++++++++++++++ conf/ontake.conf.sh | 64 +++++++++++++++++++++++++++++ conf/seguam.conf.sh | 67 +++++++++++++++++++++++++++++++ conf/segula.conf.sh | 48 ++++++++++++++++++++++ conf/spurr.conf.sh | 66 ++++++++++++++++++++++++++++++ conf/trident.conf.sh | 66 ++++++++++++++++++++++++++++++ lib/version.sh | 4 +- modules/conf_network.sh | 5 ++- modules/conf_nfs.sh | 51 +++++++++++++++++++++++ modules/conf_ntp.sh | 28 +++++++++---- modules/install_profile.sh | 22 ++++++---- repo/common/pkgman/devuan_5.list | 9 +++++ repo/common/profile/.bashrc | 2 +- 27 files changed, 984 insertions(+), 33 deletions(-) create mode 100644 conf/amak.conf.sh create mode 100644 conf/amukta.conf.sh create mode 100644 conf/augustine.conf.sh create mode 100644 conf/auto/devuan-5.conf.sh create mode 100644 conf/carlisle.conf.sh create mode 100644 conf/dana.conf.sh create mode 100644 conf/fuji.conf.sh create mode 100644 conf/gilbert.conf.sh create mode 100644 conf/katmai.conf.sh create mode 100644 conf/kiska.conf.sh create mode 100644 conf/mageik.conf.sh create mode 100644 conf/okmok.conf.sh create mode 100644 conf/ontake.conf.sh create mode 100644 conf/seguam.conf.sh create mode 100644 conf/segula.conf.sh create mode 100644 conf/spurr.conf.sh create mode 100644 conf/trident.conf.sh create mode 100644 modules/conf_nfs.sh create mode 100644 repo/common/pkgman/devuan_5.list diff --git a/conf/amak.conf.sh b/conf/amak.conf.sh new file mode 100644 index 0000000..d2e4c49 --- /dev/null +++ b/conf/amak.conf.sh @@ -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" diff --git a/conf/amukta.conf.sh b/conf/amukta.conf.sh new file mode 100644 index 0000000..9002f5a --- /dev/null +++ b/conf/amukta.conf.sh @@ -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" diff --git a/conf/augustine.conf.sh b/conf/augustine.conf.sh new file mode 100644 index 0000000..9002f5a --- /dev/null +++ b/conf/augustine.conf.sh @@ -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" diff --git a/conf/auto/devuan-5.conf.sh b/conf/auto/devuan-5.conf.sh new file mode 100644 index 0000000..29096f8 --- /dev/null +++ b/conf/auto/devuan-5.conf.sh @@ -0,0 +1,2 @@ + +export NTP_SERV=ntpsec diff --git a/conf/auto/devuan.conf.sh b/conf/auto/devuan.conf.sh index c2042d3..a0471f4 100644 --- a/conf/auto/devuan.conf.sh +++ b/conf/auto/devuan.conf.sh @@ -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%" + diff --git a/conf/carlisle.conf.sh b/conf/carlisle.conf.sh new file mode 100644 index 0000000..9002f5a --- /dev/null +++ b/conf/carlisle.conf.sh @@ -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" diff --git a/conf/dana.conf.sh b/conf/dana.conf.sh new file mode 100644 index 0000000..9002f5a --- /dev/null +++ b/conf/dana.conf.sh @@ -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" diff --git a/conf/fuji.conf.sh b/conf/fuji.conf.sh new file mode 100644 index 0000000..c34ee37 --- /dev/null +++ b/conf/fuji.conf.sh @@ -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" diff --git a/conf/gilbert.conf.sh b/conf/gilbert.conf.sh new file mode 100644 index 0000000..9002f5a --- /dev/null +++ b/conf/gilbert.conf.sh @@ -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" diff --git a/conf/includes/mam.conf.sh b/conf/includes/mam.conf.sh index 3783b44..48df96b 100644 --- a/conf/includes/mam.conf.sh +++ b/conf/includes/mam.conf.sh @@ -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" diff --git a/conf/includes/pkgsel.base.conf.sh b/conf/includes/pkgsel.base.conf.sh index 4bce47f..c43d24b 100644 --- a/conf/includes/pkgsel.base.conf.sh +++ b/conf/includes/pkgsel.base.conf.sh @@ -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" diff --git a/conf/katmai.conf.sh b/conf/katmai.conf.sh new file mode 100644 index 0000000..9002f5a --- /dev/null +++ b/conf/katmai.conf.sh @@ -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" diff --git a/conf/kiska.conf.sh b/conf/kiska.conf.sh new file mode 100644 index 0000000..9002f5a --- /dev/null +++ b/conf/kiska.conf.sh @@ -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" diff --git a/conf/mageik.conf.sh b/conf/mageik.conf.sh new file mode 100644 index 0000000..9002f5a --- /dev/null +++ b/conf/mageik.conf.sh @@ -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" diff --git a/conf/okmok.conf.sh b/conf/okmok.conf.sh new file mode 100644 index 0000000..9002f5a --- /dev/null +++ b/conf/okmok.conf.sh @@ -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" diff --git a/conf/ontake.conf.sh b/conf/ontake.conf.sh new file mode 100644 index 0000000..adae6f4 --- /dev/null +++ b/conf/ontake.conf.sh @@ -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 \ + diff --git a/conf/seguam.conf.sh b/conf/seguam.conf.sh new file mode 100644 index 0000000..9293410 --- /dev/null +++ b/conf/seguam.conf.sh @@ -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 \ + diff --git a/conf/segula.conf.sh b/conf/segula.conf.sh new file mode 100644 index 0000000..9002f5a --- /dev/null +++ b/conf/segula.conf.sh @@ -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" diff --git a/conf/spurr.conf.sh b/conf/spurr.conf.sh new file mode 100644 index 0000000..0007e64 --- /dev/null +++ b/conf/spurr.conf.sh @@ -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" diff --git a/conf/trident.conf.sh b/conf/trident.conf.sh new file mode 100644 index 0000000..87230b7 --- /dev/null +++ b/conf/trident.conf.sh @@ -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" diff --git a/lib/version.sh b/lib/version.sh index 801d507..4cb321f 100644 --- a/lib/version.sh +++ b/lib/version.sh @@ -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 diff --git a/modules/conf_network.sh b/modules/conf_network.sh index eb44d6a..93fda65 100644 --- a/modules/conf_network.sh +++ b/modules/conf_network.sh @@ -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 } diff --git a/modules/conf_nfs.sh b/modules/conf_nfs.sh new file mode 100644 index 0000000..9c23312 --- /dev/null +++ b/modules/conf_nfs.sh @@ -0,0 +1,51 @@ +# ------------------------------------------------------------------------------ +# Description of module conf_nfs +# Copyright (c) Year Your Name +# ------------------------------------------------------------------------------ +# +# ------------------------------------------------------------------------------ +# Variable list: +# * : 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 diff --git a/modules/conf_ntp.sh b/modules/conf_ntp.sh index 64b76a0..32cffa5 100644 --- a/modules/conf_ntp.sh +++ b/modules/conf_ntp.sh @@ -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 } diff --git a/modules/install_profile.sh b/modules/install_profile.sh index ff79c92..9da170f 100644 --- a/modules/install_profile.sh +++ b/modules/install_profile.sh @@ -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 diff --git a/repo/common/pkgman/devuan_5.list b/repo/common/pkgman/devuan_5.list new file mode 100644 index 0000000..fcd4f58 --- /dev/null +++ b/repo/common/pkgman/devuan_5.list @@ -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 diff --git a/repo/common/profile/.bashrc b/repo/common/profile/.bashrc index 7f332ba..ae90b20 100644 --- a/repo/common/profile/.bashrc +++ b/repo/common/profile/.bashrc @@ -112,4 +112,4 @@ if ! shopt -oq posix; then fi fi -. ~/profile +PROFILE_PATH=~/profile . ~/profile/profile.sh