source: freewrt/package/fwifupdown/files/mfunctions.sh@ 655dec8

Last change on this file since 655dec8 was 4624b5d, checked in by Christian Fischer <spaetzle@…>, 19 years ago

Added package fwifupdown, added busybox ifupdown patch

git-svn-id: svn://www.freewrt.org/trunk/freewrt@2373 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 1014 bytes
RevLine 
[4624b5d]1# $FreeWRT$
2#
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6#
7# Christian Fischer <spaetzle@freewrt.org>
8#
9
10. /opt/ifupdown/bin/mprint.sh
11
12
13mstart() {
14 mprint -d "Starting $IFACE_TYPE $IFACE"
15 MDENT=$(expr ${MDENT:-0} + 1)
16 pos_update
17}
18
19mstop() {
20 mprint -d "Stopping $IFACE_TYPE $IFACE"
21 MDENT=$(expr ${MDENT:-0} + 1)
22 pos_update
23}
24
25mup() {
26 mprint -n "Bringing up $IFACE_TYPE $IFACE"
27}
28
29mdown() {
30 mprint -n "Bringing down $IFACE_TYPE $IFACE"
31}
32
33madd() {
34 mprint -n "Adding ${1:-$IFACE}"
35}
36
37mremove() {
38 mprint -n "Removing ${1:-$IFACE}"
39}
40
41mcreate() {
42 mprint -n "Creating ${2:-$IFACE_TYPE} ${1:-$IFACE}"
43}
44mdestroy() {
45 mprint -n "Destroying ${2:-$IFACE_TYPE} ${1:-$IFACE}"
46}
47
48merr() {
49 mprint "${HILITE}" "Error: ${@}"
50}
51
52minfo() {
53 mprint "${HILITE}" "Info: ${@}"
54}
55
56mwarn() {
57 mprint "${HILITE}" "Warning: ${@}"
58}
59
60mstate() {
61 mprint -e $1
62 return $1
63}
64
65
66# vim:ts=4
Note: See TracBrowser for help on using the repository browser.