]> git.pld-linux.org Git - packages/libteam.git/blob - teamd-lvl2-service-generator
- split libteamdctl* packages; release 3
[packages/libteam.git] / teamd-lvl2-service-generator
1 #!/bin/sh
2
3 destunitdir=${1:-/tmp}
4
5 # Do nothing if target is disabled
6 [ -e /etc/systemd/system/network.target.wants/teamd-lvl2.target ] || exit 0
7
8 [ -f /etc/sysconfig/teamd ] && . /etc/sysconfig/teamd
9
10 if [ -d $destunitdir/teamd-lvl2.target.wants ]; then
11         rm -f $destunitdir/teamd-lvl2.target.wants/teamd@*.service
12 else
13         mkdir -p $destunitdir/teamd-lvl2.target.wants
14 fi
15
16 for teamif in $LVL2TEAMIFS; do
17         [ -L $destunitdir/teamd-lvl2.target.wants/teamd@$teamif.service ] && \
18                 continue
19         ln -s /lib/systemd/system/teamd@.service \
20                 $destunitdir/teamd-lvl2.target.wants/teamd@$teamif.service
21 done
This page took 0.075107 seconds and 3 git commands to generate.