Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #lines 178 to 242 of /usr/sbin/net-setup.sh (puppylinux)
- # http://www.pearltrees.com/s243a/usr-sbin-net-setup-puppylinux/id16430354
- refreshMainWindowInfo ()
- {
- # Dougal: comment out and move to the showLoadModuleWindow -- only used there...
- #findLoadedModules
- getInterfaceList
- #rm -f /tmp/interface-modules
- for INTERFACE in $INTERFACES
- do
- [ "$INTERFACE" ] || continue
- # Dougal: use function for finding/setting info to be used in tree (below)
- findInterfaceInfo "$INTERFACE"
- ## Dougal: use a tree to display interface info
- INTERFACE_DATA="$INTERFACE_DATA <item>$INTERFACE|$INTTYPE|$FI_DRIVER|$TYPE: $INFO</item>"
- # add to display list
- INTERFACEBUTTONS="
- ${INTERFACEBUTTONS}
- <vbox>
- <pixmap><input file>$BLANK_IMAGE</input></pixmap>
- <button>
- <label>${INTERFACE}</label>
- <action>EXIT:Interface_${INTERFACE}</action>
- </button>
- </vbox>"
- done
- if [ "$INTERFACE_DATA" ] ; then
- # Get the right height for the tree...
- case "$INTERFACE_NUM" in
- 1) HEIGHT=70 ;;
- 2) HEIGHT=100 ;;
- 3) HEIGHT=125 ;;
- 4) HEIGHT=150 ;;
- 5) HEIGHT=175 ;;
- 6) HEIGHT=200 ;;
- esac
- INTERFACEBUTTONS="
- <tree>
- <label>$L_LABEL_Interface_Tree_Header</label>
- $INTERFACE_DATA
- <height>$HEIGHT</height><width>350</width>
- <variable>SELECTED_INTERFACE</variable>
- </tree>
- <hbox>
- $INTERFACEBUTTONS
- </hbox>"
- fi
- case $INTERFACE_NUM in
- 0) # no interfaces
- echo "$L_ECHO_No_Interfaces_Message" > /tmp/net-setup_MSGINTERFACES.txt
- ;;
- 1) # only one
- echo "$L_ECHO_One_Interface_Message" > /tmp/net-setup_MSGINTERFACES.txt
- ;;
- *) # more than one interface
- echo "$L_ECHO_Multiple_Interfaces_Message" > /tmp/net-setup_MSGINTERFACES.txt
- ;;
- esac
- #echo "Puppy has done a quick check to see which network driver modules are currently loaded. Here they are (the relevant interface is in brackets):
- #${LOADEDETH}" > /tmp/net-setup_MSGMODULES.txt
- } # end refreshMainWindowInfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement