coreapp-vm command, uninstall.sh, stale-system check
- bin/coreapp-vm replaces scripts/create-coreserver-vm.sh: create (downloads and checks the CoreServer image when it's missing, resumes an interrupted download), list, ip, ssh (own known_hosts), start, stop, delete (asks for the name). update.sh symlinks it into ~/.local/bin. - uninstall.sh removes coreapp-vm, the coreapp network, its hook and ufw rules; asks before deleting VMs, the image and keys. - install.sh runs CoreDesktop's update first when the system wasn't upgraded in the last day, as `sibling add` does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+16
@@ -13,6 +13,22 @@ if [ ! -f "$COREDESKTOP/utils.sh" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Packages are installed from pacman's package lists. If the system hasn't
|
||||
# been upgraded for a day, they may name versions the mirrors have deleted
|
||||
# (404s). `sibling add` checks this itself; this is for running install.sh by
|
||||
# hand. Only CoreDesktop's update may upgrade the system.
|
||||
if [ -z "${COREDESKTOP_ALLOW_PACMAN:-}" ]; then
|
||||
last="$(grep -F '[PACMAN] starting full system upgrade' /var/log/pacman.log 2> /dev/null | tail -n 1)"
|
||||
last="${last#\[}"
|
||||
last="${last%%]*}"
|
||||
if [ -z "$last" ] || ! last="$(date -d "$last" +%s 2> /dev/null)" \
|
||||
|| (( ($(date +%s) - last) / 3600 >= 24 )); then
|
||||
echo "This system hasn't been upgraded today. Running update first, so"
|
||||
echo "coreapp-dev installs current packages..."
|
||||
"$HOME/.local/bin/update" || echo "update reported errors (above); installing anyway."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -e /dev/kvm ]; then
|
||||
echo "/dev/kvm is missing: turn on virtualization (VT-x/AMD-V) in the firmware"
|
||||
echo "settings, then run this again."
|
||||
|
||||
Reference in New Issue
Block a user