Changeset 116
- Timestamp:
- 08/27/06 16:08:41 (7 years ago)
- Location:
- floppyfw/packages/skeleton/wsmenu/etc
- Files:
-
- 3 modified
-
showffw.sh (modified) (2 diffs)
-
voipvars.sh (modified) (1 diff)
-
wsmenu.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
floppyfw/packages/skeleton/wsmenu/etc/showffw.sh
r113 r116 1 1 #!/bin/sh 2 2 3 # showffw.sh by Brad Skiff 20060 7133 # showffw.sh by Brad Skiff 20060825 4 4 # 5 5 . /etc/config 6 6 . /etc/inside.info 7 7 . /etc/outside.info 8 echo 9 myvers=`uname -r` 10 echo "Version ${myvers} is running as follows:" 11 echo 12 printf "\t\t Inside\t\tOutside 13 Physical device: %-15s\t%-15s 14 Logical device: %-15s\t%-15s 15 \t Network: %-15s\t%-15s 16 IP Address: %-15s\t%-15s 17 \t Netmask: %-15s\t%-15s 18 Broadcast: %-15s\t%-15s 19 \t Gateway: %-15s\t%-15s\n" $INSIDE_DEV $OUTSIDE_DEV \ 8 9 OUT_MAC=`ifconfig |grep eth0 |cut -f 2 -d 'W' |cut -f 2 -d ' '` 10 IN_MAC=`ifconfig |grep eth1 |cut -f 2 -d 'W' |cut -f 2 -d ' '` 11 12 printf "## Revision: ${myvers} ##\n 13 \t\t Inside\t\tOutside 14 MAC HWaddr: %-17s\t%-17s 15 Physical device: %-17s\t%-17s 16 Logical device: %-17s\t%-17s 17 \t Network: %-17s\t%-17s 18 IP Address: %-17s\t%-17s 19 \t Netmask: %-17s\t%-17s 20 Broadcast: %-17s\t%-17s 21 \t Gateway: %-17s\t%-17s\n" $IN_MAC $OUT_MAC \ 22 $INSIDE_DEV $OUTSIDE_DEV \ 20 23 $INSIDE_DEVICE $OUTSIDE_DEVICE \ 21 24 $INSIDE_NETWORK $OUTSIDE_NETWORK \ … … 24 27 $INSIDE_BROADCAST $OUTSIDE_BROADCAST \ 25 28 "[None Set]" $OUTSIDE_GATEWAY 29 26 30 echo 27 31 echo "contents of /etc/resolv.conf:" -
floppyfw/packages/skeleton/wsmenu/etc/voipvars.sh
r113 r116 1 1 #!/bin/sh 2 2 3 # voipvars.sh by Brad Skiff 20060 7133 # voipvars.sh by Brad Skiff 20060824 4 4 # 5 5 . /etc/config 6 echo7 6 myvers=`uname -r` 8 echo "Version ${myvers} is running as follows:" 9 echo 10 printf " ColumnA\t\t ColumnB 7 printf "## Revision: ${myvers} ##\n 8 config VoIP\t config VoIP 11 9 Var: %-24s %-24s 12 10 set: %-24s %-24s -
floppyfw/packages/skeleton/wsmenu/etc/wsmenu.sh
r113 r116 1 1 #!/bin/sh 2 2 3 # wsmenu.sh by Brad Skiff 20060815 3 REVN="r03" 4 # 5 # wsmenu.sh by Brad Skiff 4 6 # 5 p ress_enter()7 p_e () 6 8 { 7 9 echo "" 8 10 echo -n "Press Enter for wsmenu " 9 read selection11 read pick 10 12 clear 11 13 } 12 14 13 MENU1="1 - Show VoIP config Vars" 14 MENU2="2 - Show wshaper status" 15 MENU3="3 - Stop wshaper" 16 MENU4="4 - Start wshaper" 17 MENU5="5 - Start wshaper - nocop" 18 MENU6="6 - Show floppyfw I/O setup" 19 MENU7="7 - Re-run firewall.init" 20 MENU8="8 - Show disk space" 21 MENU9="9 - Show memory use" 22 MENU0="0 - exit wsmenu" 15 M1="1 - VoIP config" 16 M2="2 - wshaper status" 17 M3="3 - >STOP wshaper" 18 M4="4 - >START wshaper" 19 M5="5 - >START wshaper nocop" 20 M6="6 - floppyfw I/O setup" 21 M7="7 - >RE-INIT firewall" 22 # 23 M8="8 - disk space" 24 M9="9 - memory use" 25 MA="a - ip_conntrack - all" 26 MB="b - ip_conntrack - tcp" 27 MC="c - ip_conntrack - udp" 28 MD="d - iptables -L -n -v" 29 M0="0 - >exit wsmenu" 23 30 24 selection= 25 until [ "$selection" = "0" ]; do 26 printf "\t\t\t## wsmenu ##\n 31 pick= 32 until [ "$pick" = "0" ]; do 33 printf "\t\t## wsmenu $REVN ##\n 34 show >Do\t\t\tshow >Do 27 35 %-28s %-28s 28 36 %-28s %-28s 29 37 %-28s %-28s 30 38 %-28s %-28s 31 %-28s %-28s\n" "$MENU1" "$MENU6" \ 32 "$MENU2" "$MENU7" \ 33 "$MENU3" "$MENU8" \ 34 "$MENU4" "$MENU9" \ 35 "$MENU5" "$MENU0" 39 %-28s %-28s 40 %-28s %-28s 41 %-28s %-28s\n" "$M1" "$M8" \ 42 "$M2" "$M9" \ 43 "$M3" "$MA" \ 44 "$M4" "$MB" \ 45 "$M5" "$MC" \ 46 "$M6" "$MD" \ 47 "$M7" "$M0" 36 48 echo "" 37 echo -n " Enter (1-9or 0): "38 read selection49 echo -n " Enter (1-9/a-d or 0): " 50 read pick 39 51 echo "" 40 case $selection in 41 1 ) . /etc/voipvars.sh ; press_enter ;; 42 2 ) wshaper.htb status ; press_enter ;; 43 3 ) wshaper.htb stop ; press_enter ;; 44 4 ) wshaper.htb ; press_enter ;; 45 5 ) wshaper.htb nocop ; press_enter ;; 46 6 ) . /etc/showffw.sh ; press_enter ;; 47 7 ) . /etc/firewall.init ; press_enter ;; 48 8 ) df -h ; press_enter ;; 49 9 ) free ; press_enter ;; 52 case $pick in 53 1 ) . /etc/voipvars.sh ; p_e ;; 54 2 ) wshaper.htb status ; p_e ;; 55 3 ) wshaper.htb stop ; p_e ;; 56 4 ) wshaper.htb ; p_e ;; 57 5 ) wshaper.htb nocop ; p_e ;; 58 6 ) . /etc/showffw.sh ; p_e ;; 59 7 ) . /etc/firewall.init ; p_e ;; 60 8 ) df -h ; p_e ;; 61 9 ) free ; p_e ;; 62 a ) cat /proc/net/ip_conntrack ; p_e ;; 63 b ) cat /proc/net/ip_conntrack |grep tcp ; p_e ;; 64 c ) cat /proc/net/ip_conntrack |grep udp ; p_e ;; 65 d ) iptables -L -n -v ; p_e ;; 50 66 0 ) exit ;; 51 * ) echo "Please enter 1-9 or 0"; press_enter67 * ) echo "Please enter 1-9/a-d or 0" ; p_e 52 68 esac 53 69 done