File manager - Edit - /var/lib/dpkg/info/runit.preinst
Back
#!/bin/sh set -eu # Ugly hack to make upgrade from every previous version # smooth and `piuparts'-clean. if [ "$1" = upgrade ] ; then case "$2" in 2.1.2-3) # Leaving files behind is bug in version 2.1.2-3, but # let's do our best to workaround it at upgrade. rm -f /etc/sv/getty-5/run /etc/sv/getty-5/finish rmdir --ignore-fail-on-non-empty /etc/sv/getty-5 rm -f /etc/systemd/system/multi-user.target.wants/runit.service # Actually only to make piuparts happy. This directory # will be created by first -run package anyway. rmdir --ignore-fail-on-non-empty /etc/sv ;; 2.1.2-6) rm -f /etc/runit/runsvdir/current rmdir --ignore-fail-on-non-empty /etc/runit/runsvdir/ rmdir --ignore-fail-on-non-empty /etc/runit ;; esac fi servlink=$(readlink -f /etc/service) # We are at pre-inst, this directory may not exist yet. See #927442. mkdir -p /etc/runit/runsvdir if [ ! -e /etc/runit/runsvdir/current ]; then #rm any broken/old symlink, just to be sure rm -f /etc/runit/runsvdir/current echo 'runit: setting up for runsvchdir' #now current symlink does not exists, we can safely create it ln -s /etc/runit/runsvdir/default /etc/runit/runsvdir/current echo 'runit: current symlink succesfully created' fi if [ "$servlink" = '/etc/runit/runsvdir/default' ]; then # we are running in the default rundir, proceed with the switch # note that ln is not safe to use here as it does an unlink before # creating the new link; using mv instead printf "runit: switching /etc/service to current... " ln -s /etc/runit/runsvdir/current /etc/service-new mv -T /etc/service-new /etc/service printf "done\n" fi
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.29 |
proxy
|
phpinfo
|
Settings