| 1 | #! /bin/sh |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | ## Make sure that /dev/net/tun exists. Don't do anything special if devfs or |
| 6 | ## udev is running. |
| 7 | if [ ! -c /dev/.devfsd ] && |
| 8 | [ ! -d /dev/.udev ] && |
| 9 | [ ! -c /dev/net/tun ] |
| 10 | then |
| 11 | echo "/dev/net/tun not present: invoking MAKEDEV to create it." |
| 12 | (cd /dev && /sbin/MAKEDEV tun) |
| 13 | fi |
| 14 | |
| 15 | ## Make sure that the `tripe' user and group exist. |
| 16 | getent group tripe >/dev/null || |
| 17 | addgroup --system tripe |
| 18 | getent passwd tripe >/dev/null || \ |
| 19 | adduser --system \ |
| 20 | --ingroup tripe \ |
| 21 | --home /etc/tripe \ |
| 22 | --gecos "TrIPE server" \ |
| 23 | tripe |
| 24 | |
| 25 | ## Create the log directory and an initial logfile. |
| 26 | if [ ! -d /var/log/tripe ]; then |
| 27 | mkdir -m2750 /var/log/tripe |
| 28 | chown tripe:adm /var/log/tripe |
| 29 | fi |
| 30 | if [ ! -f /var/log/tripe/tripe.log ]; then |
| 31 | (umask 027; touch /var/log/tripe/tripe.log) |
| 32 | chown tripe:adm /var/log/tripe/tripe.log |
| 33 | fi |
| 34 | |
| 35 | #DEBHELPER# |