File: install-953875

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 (29 lines) | stat: -rwxr-xr-x 747 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
set -e

# this test make sure that runit is installable in a default system
# without causing trouble or unexpected results, and quickly caught
# regressions
# see #953875 and #960705

#check that systamd is the init (symlink of /sbin/init --> /lib/systemd/systemd )
init_symlink=$(readlink /sbin/init)
is_init="$(basename "$init_symlink")"
echo "init is "$is_init""

# attempt to install runit
echo "installing runit..."
apt-get install -y runit
echo "done"

#check that /sbin/init still points to systemd
init_symlink=$(readlink /sbin/init)
is_init=$(basename $init_symlink)

if [ "$is_init" = systemd ]; then
    echo "OK: the default init is still systemd"
    exit 0
else
    echo "FAIL: init switched to "$is_init" "
    exit 1
fi