#!/bin/sh set -e # Post-installation script for deb-bootupd # This script runs after the package is installed # Reload systemd to pick up new service files if command -v systemctl >/dev/null 2>&1; then deb-systemd-invoke daemon-reload >/dev/null 2>&1 || true fi # Note: bootloader-update.service is NOT a daemon - it's a oneshot service # that runs bootupctl update when triggered, then exits # The service is enabled by default but only runs when explicitly triggered # Create initial bootupd state directory if it doesn't exist if [ ! -d /boot ]; then mkdir -p /boot fi # Set proper permissions for the binary if [ -f /usr/libexec/bootupd ]; then chmod 755 /usr/libexec/bootupd fi # Verify symlink was created correctly if [ ! -L /usr/bin/bootupctl ]; then ln -sf ../libexec/bootupd /usr/bin/bootupctl fi echo "deb-bootupd installed successfully!" echo "Use 'bootupctl status' to check system status" echo "Use 'bootupctl update' to update bootloaders" echo "Note: bootupd is a CLI tool, not a daemon - it runs when called and exits"