Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 3.17.166.157
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/libexec/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/libexec/ebtables
#!/bin/bash

RETVAL=0
EBTCONF=/etc/sysconfig/ebtables

initialize() {
  # Initialize $TYPE tables
  echo -n $"  $TYPE tables: "
  if [ -r /etc/sysconfig/ebtables.$TYPE ]; then
    /sbin/ebtables -t $TYPE --atomic-file /etc/sysconfig/ebtables.$TYPE --atomic-commit > /dev/null || RETVAL=1
  else
    echo -n "not configured"
  fi
  if [ $RETVAL -eq 0 ]; then
    echo -n $"[  OK  ]"
    echo -ne "\r"
  else
    echo -n $"[FAILED]"
    echo -ne "\r"
  fi
}

case $1 in
  start)
    if [[ -r $EBTCONF ]]; then
      ebtables-restore <$EBTCONF
      RETVAL=$?
    else
      echo -n "not configured"
    fi
    if [ $RETVAL -eq 0 ]; then
      echo -n $"[  OK  ]"
      echo -ne "\r"
    else
      echo -n $"[FAILED]"
      echo -ne "\r"
    fi
  ;;
  stop)
    [[ $EBTABLES_SAVE_ON_STOP == "yes" ]] && $0 save
    /sbin/ebtables --init-table
    RETVAL=$?

    if [ $RETVAL -eq 0 ]; then
      echo -n $"[  OK  ]"
      echo -ne "\r"
    else
      echo -n $"[FAILED]"
      echo -ne "\r"
    fi
  ;;
  save)
    echo -n $"Saving Ethernet bridge filtering (ebtables): "
    ebtables-save >$EBTCONF
    RETVAL=$?

    if [ $RETVAL -eq 0 ]; then
      echo -n $"[  OK  ]"
      echo -ne "\r"
    else
      echo -n $"[FAILED]"
      echo -ne "\r"
    fi
  ;;
  *)
    echo "usage: ${0##*/} {start|stop|save}" >&2
    exit 1
  ;;
esac

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

Stv3n404 - 2023