From ebfc52256b5a4c947a97a6a455e6d52f9192208f Mon Sep 17 00:00:00 2001 From: tb14 Date: Sun, 6 Nov 2022 15:57:39 -0600 Subject: [PATCH] snapd error reporting. --- AmRRON-Setup-Script.sh | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/AmRRON-Setup-Script.sh b/AmRRON-Setup-Script.sh index ea52f93..aa2d238 100755 --- a/AmRRON-Setup-Script.sh +++ b/AmRRON-Setup-Script.sh @@ -1443,7 +1443,8 @@ if [[ ${CHIRP} == ${NEWCHIRP} ]]; then { ERRCODE="Failed to install chirp flatpak."; errors; return; } else - + echo snap_fail_chirp >> /tmp/cleanup + sudo apt-get install -y snapd || { ERRCODE="Failed to install Snap for Chirp installation"; errors; return; } ### Testing to see if this avoids a restart requirement @@ -1451,10 +1452,10 @@ if [[ ${CHIRP} == ${NEWCHIRP} ]]; then { ERRCODE="Failed to install Chirp from snap store."; errors; return; } sudo snap install chirp-snap --edge || - { echo snap_fail >> /tmp/cleanup; } && { ERRCODE="Failed to install Chirp from snap store."; errors; return; } + { ERRCODE="Failed to install Chirp from snap store."; errors; return; } sudo snap connect chirp-snap:raw-usb || - { echo snap_fail >> /tmp/cleanup; } && { ERRCODE="Failed to set USB permissions for Chirp-snap."; errors; return; } + { ERRCODE="Failed to set USB permissions for Chirp-snap."; errors; return; } fi fi @@ -2591,7 +2592,8 @@ function keepassxc_install() { { ERRCODE="Failed to install keepassxc flatpak."; errors; return; } else - + echo snap_fail_keepass >> /tmp/cleanup + sudo apt-get install -y snapd || { ERRCODE="Failed to install snapd."; errors; return; } @@ -2600,10 +2602,10 @@ function keepassxc_install() { { ERRCODE="Failed to set modprobe squashfs to avoid restart."; errors; return; } sudo snap install core || - { echo snap_fail >> /tmp/cleanup; } && { ERRCODE="Failed to install snap / snap core requirements for KeepassXC"; errors; return; } + { ERRCODE="Failed to install snap / snap core requirements for KeepassXC"; errors; return; } sudo snap install keepassxc || - { echo snap_fail >> /tmp/cleanup; } && { ERRCODE="Failed to install snap / snap core requirements for KeepassXC"; errors; return; } + { ERRCODE="Failed to install snap / snap core requirements for KeepassXC"; errors; return; } fi } @@ -4044,11 +4046,23 @@ cleanupyad ;; -snap_fail) + snap_fail_chirp) + TITLE="Requires Reboot" -TEXT="snapd was installed in order to manage the installation of Chirp and keepassxc on this system. \ -Snap requires a reboot before being able to install your programs. Please reboot, run this installer again and \ -and reselect chirp and keepassxc if you would like to install them." +TEXT="If you received an installation error for Chirp, a restart is required. \ +Snapd was installed in order to manage the installation of Chirp on this system. \ +Snap requires a reboot after its first installation before being able to install your programs. \ +Please reboot, run this installer again and reselect Chirp if you would like to install it." + cleanupyad + ;; + + snap_fail_keepass) + +TITLE="Requires Reboot" +TEXT="If you received an installation error for KeepassXC, a restart is required. \ +Snapd was installed in order to manage the installation of KeepassXC on this system. \ +Snap requires a reboot after its first installation before being able to install your programs. \ +Please reboot, run this installer again and reselect KeepassXC if you would like to install it." cleanupyad ;;