home *** CD-ROM | disk | FTP | other *** search
/ PCNET 2006 September - Disc 1 / PCNET_CD_2006_09.iso / linux / puppy-barebones-2.01r2.iso / pup_201.sfs / usr / local / WAG / socket-test < prev   
Encoding:
Text File  |  2005-10-31  |  1.2 KB  |  40 lines

  1. #!/bin/sh
  2.  
  3. NL="
  4. "
  5. FEEDBACK=""
  6. FEEDBACK2=""
  7.  
  8. FEEDBACK=`xmessage -buttons "Continue,No PCMCIA,Cancel" -print -center "WARNING:${NL}This will eject all PCMCIA cards${NL}Cards should not be in use${NL}Running this app will allow you to choose your socket${NL}It will be automatically entered into WAG${NL}If you do not use a PCMCIA card, press No PCMCIA.`
  9.     
  10. if [ "$FEEDBACK" = "Continue" ]; then
  11.         cardctl eject
  12.         cardctl insert
  13.         LABEL="Select your socket number:${NL}${NL}${NL}"
  14.         LABEL="${LABEL}`cardctl ident`"
  15.         FEEDBACK2=`xmessage -buttons "0,1" -print -center "$LABEL"`
  16.     
  17.     if [ "$FEEDBACK2" = "" ]; then
  18.         FEEDBACK2="0"
  19.     fi
  20.     
  21.     SOCTEST=`grep 'CARDSOC=' /etc/WAG/wag-conf`
  22.     
  23.     if [ "$SOCTEST" = "" ]; then
  24.         echo "CARDSOC=\"$FEEDBACK2\"" >> /etc/WAG/wag-conf    
  25.     else
  26.         xmessage -center "Error: socket already configured${NL}Did not modify wag-conf${NL}Please inspect /etc/WAG/wag-conf"
  27.     fi
  28. fi
  29.  
  30. if [ "$FEEDBACK" = "No PCMCIA" ]; then
  31.     FEEDBACK2=""
  32.     
  33.     SOCTEST=`grep 'CARDSOC=' /etc/WAG/wag-conf`
  34.     
  35.     if [ "$SOCTEST" = "" ]; then
  36.         echo "CARDSOC=\"$FEEDBACK2\"" >> /etc/WAG/wag-conf    
  37.     else
  38.         xmessage -center "Error: socket already configured${NL}Did not modify wag-conf${NL}Please inspect /etc/WAG/wag-conf"
  39.     fi
  40. fi