pmaports/main/postmarketos-base/postmarketos-base.post-install
Newbyte f2c7c48e2a
main/postmarketos-base: make apk interactive by default (MR 3444)
This would mitigate issues where apk unexpectedly replaces packages
somewhat as this way the user will be able to see precisely what changes
will happen to their system before they are committed. Furthermore, most
users are likely accustomed to package managers like apt, dnf, pacman,
among others that all are interactive by default and as such this would
provide a more familiar experience for them.

This will not affected pre-existing installs, and advanced users who
do not like this behaviour can restore the old one by deleting
/etc/apk/interactive.

[ci:skip-build]: already built successfully in CI
2022-09-28 09:18:55 +02:00

31 lines
727 B
Bash

#!/bin/sh -e
# Enable eudev service
rc-update add udev sysinit
rc-update add udev-trigger sysinit
rc-update add udev-settle sysinit
rc-update add udev-postmount default
# Enable other OpenRC services
for service in devfs dmesg; do
rc-update -q add $service sysinit
done
for service in hwclock modules sysctl hostname bootmisc syslog; do
rc-update -q add $service boot
done
for service in sshd swapfile local; do
rc-update -q add $service default
done
for service in mount-ro killprocs savecache; do
rc-update -q add $service shutdown
done
# Prime swclock with a reasonable date/time on first boot
mkdir -p /run/openrc
touch /run/openrc/shutdowntime
# Make apk interactive by default
touch /etc/apk/interactive
exit 0