several improvement and armonisation in filefct.sh, module auth and patch_snmp improved

This commit is contained in:
2022-01-27 13:17:56 +01:00
parent baac34cb85
commit 55a9e49101
16 changed files with 204 additions and 116 deletions

View File

@@ -8,12 +8,12 @@
# https://opensource.org/licenses/BSD-3-Clause
# ------------------------------------------------------------------------------
export VER_install_profile="0.0.5"
export VER_install_profile="0.0.6"
export DEP_install_profile="install_pkg"
install_profile()
{
installfile profile/ansi_shadow.flf /usr/share/figlet/ansi_shadow.flf
install_file profile/ansi_shadow.flf /usr/share/figlet/ansi_shadow.flf
local usrlist="/root"
if find /home -mindepth 1 -maxdepth 1 -type d | read; then
@@ -21,22 +21,22 @@ install_profile()
fi
for usr in $usrlist; do
backupdist $usr/{.,}profile $usr/.bashrc
installfile profile/{{.,}profile,.bashrc} $usr/
tagfile $usr/{{.,}profile,.bashrc}
installfile profile/.tmux/.tmux.conf{,.local} $usr/
tagfile $usr/.tmux.conf{,.local}
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}
done
unset usrlist
backupdist /etc/motd
installfile profile/motd /etc/motd
tagfile /etc/motd
backup_dist /etc/motd
install_file profile/motd /etc/motd
tag_file /etc/motd
}
precheck_install_profile()
{
file_exists profile/{{.,}profile,.bashrc,.tmux/.tmux.conf{,.local}}
file_must_exists profile/{{.,}profile,.bashrc,.tmux/.tmux.conf{,.local}}
}
export -f install_profile