File: test

package info (click to toggle)
usbauth 1.0.5-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 216 kB
  • sloc: ansic: 616; makefile: 21; sh: 1
file content (29 lines) | stat: -rw-r--r-- 797 bytes parent folder | download | duplicates (3)
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/dash
# autopkgtest check: Build and run a program against glib, to verify that the
# headers and pkg-config file are installed correctly
# Author: Kun-Hung Tsai (蔡昆宏) <moonape1226@gmail.com>

set -e
echo "run: Test"
dbus_manual_start=0
if ! test -x "/var/run/dbus/system_bus_socket"; then
    if [ -d /run/systemd/system ] && \
        which systemctl >/dev/null 2>&1; then
            systemctl start dbus.socket
    else
            service dbus start
    fi
    dbus_manual_start=1
fi
echo "allow all" | tee /etc/usbauth.conf
usbauth init
if test ${dbus_manual_start} = 1; then
    if [ -d /run/systemd/system ] && \
        which systemctl >/dev/null 2>&1; then
            systemctl stop dbus.socket
    else
            service dbus stop
    fi
fi
echo "run: Successful"
exit 0