author | spiralman <spiralman> | 2002-09-01 14:42:39 (UTC) |
---|---|---|
committer | spiralman <spiralman> | 2002-09-01 14:42:39 (UTC) |
commit | dfac71239116c4804081d925e9cf3021680b1e2c (patch) (unidiff) | |
tree | cf6a5c3897e9b73eb3415d470de95b77245abdad /noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.sh | |
parent | 27b087fc3458d3d0c01eb0485490a64b2a201541 (diff) | |
download | opie-dfac71239116c4804081d925e9cf3021680b1e2c.zip opie-dfac71239116c4804081d925e9cf3021680b1e2c.tar.gz opie-dfac71239116c4804081d925e9cf3021680b1e2c.tar.bz2 |
initial import of gonz's opie-sh scripts
Diffstat (limited to 'noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.sh') (more/less context) (show whitespace changes)
-rwxr-xr-x | noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.sh | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.sh b/noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.sh new file mode 100755 index 0000000..13a1e79 --- a/dev/null +++ b/noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.sh | |||
@@ -0,0 +1,62 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # wavelanchooser.sh - a demonstration of opie-sh | ||
4 | # | ||
5 | # Copyright (C) 2002 gonz@directbox.com | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License as published by | ||
9 | # the Free Software Foundation; either version 2, or (at your option) | ||
10 | # any later version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # 20020528-1 - fixed filename in cleanup | ||
18 | # 20020526-1 - rudimental but working | ||
19 | # 20020524-1 - initial working release planned | ||
20 | # | ||
21 | |||
22 | OPIE_SH=opie-sh | ||
23 | |||
24 | about() { | ||
25 | ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/qtwavelan.png>" | ||
26 | echo "<h3>About</h3>" | ||
27 | echo "This little App is for changing the location setting" | ||
28 | echo "for your wireless card. <br>" | ||
29 | echo "actually it only starts /etc/init.d/[home|work] and can" | ||
30 | echo "be easily turned into a quick program to start the service" | ||
31 | echo "or init script you use most." | ||
32 | echo "<p>" | ||
33 | ) | $OPIE_SH -t wavelanchooser -f & | ||
34 | SCREENCLEAN=$! | ||
35 | sleep 1 | ||
36 | } | ||
37 | |||
38 | cleanup() { | ||
39 | kill $SCREENCLEAN $SCREENCLEAN2 | ||
40 | rm -f /tmp/qcop-msg-opie-sh-wavelanchooser.sh | ||
41 | } | ||
42 | |||
43 | |||
44 | about | ||
45 | |||
46 | # choose if work or home | ||
47 | $OPIE_SH -m -t "network-settings dialog" \ | ||
48 | -M "which configuration do you want ? " \ | ||
49 | -w -0 home -1 work -g | ||
50 | |||
51 | if [ "$?" = "0" ] | ||
52 | thenDECISION=home | ||
53 | elseDECISION=work | ||
54 | fi | ||
55 | |||
56 | ( echo "you decided to choose $DECISION configuration. " | ||
57 | echo "remember to reinsert card." | ||
58 | /etc/init.d/$DECISION start | ||
59 | ) | $OPIE_SH -t "confirmation" -f \ | ||
60 | |||
61 | |||
62 | cleanup | ||