File: getty-run.prerm

package info (click to toggle)
runit 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,248 kB
  • sloc: ansic: 5,590; sh: 3,690; makefile: 385
file content (16 lines) | stat: -rwxr-xr-x 460 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
set -e

#stop all instances so that we can remove the runtime template in case of purge
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] ; then
  for instance in /etc/service/getty@* ; do
    [ -r "$instance"/.meta/pkg ] || continue
    pkgname=$(cat "$instance"/.meta/pkg)
    [ 'getty-run' = "$pkgname" ] || continue
    touch "$instance"/down
    [ -h "$instance" ] && rm "$instance"
    echo "stopping $instance (disabled)"
  done
fi

#DEBHELPER#