summaryrefslogtreecommitdiff
path: root/community/ebtables/ebtables.systemd
blob: 4c51e9b6f96c703d4fc781791948c9268bade3fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

. /etc/conf.d/ebtables

case $1 in
  start)
    ebtables-restore < "$CONFIG_FILE"
  ;;
  stop)
    [[ $SAVE_ON_STOP =~ [yY][eE][sS] ]] && $0 save
    ebtables -F
  ;;
  save)
    ebtables-save > "$CONFIG_FILE"
  ;;
  *)
    echo "usage: ${0##*/} {start|stop|save}" >&2
    exit 1
  ;;
esac

# vim:set ts=2 sw=2 ft=sh et: