commentaires

This commit is contained in:
Michel Le Cocq 2025-03-10 06:39:23 +01:00
parent 6f2fa5ab86
commit b46fb1af7a

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Time-stamp: <2025-03-09 16:10:47 nomad>
# Time-stamp: <2025-03-10 06:39:12 nomad>
# Michel Le Cocq <lecocq@ipgp.fr>
# <nomad@neuronfarm.net>
@ -21,7 +21,8 @@
# tunable variable
LOG_FILE=~/upsnapz.log
# /!\ il faut ecrire ce fichier dans le vol bootfs sinon ca a peu d'interet
LOG_FILE=/root/upsnapz.log
# Dependencies :
# - gh
@ -30,7 +31,9 @@ LOG_FILE=~/upsnapz.log
# +------------------------------------------------------------------------------------------------+
# To do or not :
#
# - il n'y a plus la sortie couleur sur stdout
# - regarder si un nouveau kernel existe et si oui faire ce qu'il y a a faire
# uname -r
# - verifier que les noms des zroot/ROOT/vol sont conformes au format attendu
# - verfier que 'gh auth status' fonctionne avant de l'utiliser (auth)
# - ameliorer l'integration de : apt full-upgrade
@ -321,7 +324,7 @@ function askupgrade()
printf '%s\n' 'apt -y upgrade'
sudo apt -y upgrade | tee -a /tmp/upsnapz-upgradable
fi
cat /tmp/upsnapz-upgradable >> $LOG_FILE
sudo cat /tmp/upsnapz-upgradable >> $LOG_FILE
else
echo no
fi
@ -349,26 +352,32 @@ function checkupgrade()
function usage()
{
echo "Usage: $(basename $0) [-h]"
echo "-b : only check zfs boot menu"
echo "-s : only show zfs snap"
echo "-b : run only check zfs boot menu"
echo "-s : run only show zfs snap"
echo "-S : ron only snanpshot bootfs"
}
while getopts 'hbs' OPTION; do
while getopts 'hbsS' OPTION; do
case "$OPTION" in
h)
usage
exit 1
exit 0
;;
b)
check_ZFS_BOOT_MENU
echo
exit 1
exit 0
;;
s)
showsnap
echo
exit 1
;;
exit 0
;;
S)
asksnap
echo
exit 0
;;
?)
usage
exit 1