summaryrefslogtreecommitdiff
path: root/noncore/tools
Unidiff
Diffstat (limited to 'noncore/tools') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/tools/opie-sh/scripts/diskfree.sh4
-rwxr-xr-xnoncore/tools/opie-sh/scripts/filesystem_mounter.sh8
-rwxr-xr-xnoncore/tools/opie-sh/scripts/hostlist.sh6
-rwxr-xr-xnoncore/tools/opie-sh/scripts/killproc.sh6
-rwxr-xr-xnoncore/tools/opie-sh/scripts/launcher_refresh.sh10
-rwxr-xr-xnoncore/tools/opie-sh/scripts/logviewer.sh8
-rwxr-xr-xnoncore/tools/opie-sh/scripts/opie-sh-ssh-askpass.sh2
-rwxr-xr-xnoncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.sh4
-rwxr-xr-xnoncore/tools/opie-sh/scripts/rsyncme.sh6
-rwxr-xr-xnoncore/tools/opie-sh/scripts/service_manager.sh6
-rwxr-xr-xnoncore/tools/opie-sh/scripts/stowctrl.sh8
-rwxr-xr-xnoncore/tools/opie-sh/scripts/usbnetctrl.sh12
12 files changed, 40 insertions, 40 deletions
diff --git a/noncore/tools/opie-sh/scripts/diskfree.sh b/noncore/tools/opie-sh/scripts/diskfree.sh
index 78415e3..0f17f15 100755
--- a/noncore/tools/opie-sh/scripts/diskfree.sh
+++ b/noncore/tools/opie-sh/scripts/diskfree.sh
@@ -1,44 +1,44 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# diskfree.sh - a demonstration of opie-sh 3# diskfree.sh - a demonstration of opie-sh
4# 4#
5# Copyright (C) 2002 gonz@directbox.com 5# Copyright (C) 2002 gonz@directbox.com
6# 6#
7# This program is free software; you can redistribute it and/or modify 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 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) 9# the Free Software Foundation; either version 2, or (at your option)
10# any later version. 10# any later version.
11# 11#
12# This program is distributed in the hope that it will be useful, 12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 15# GNU General Public License for more details.
16# 16#
17# 20020524-5 - bugfix 17# 20020524-5 - bugfix
18# 20020524-1 - initial release 18# 20020524-1 - initial release
19 19
20OPIE_SH=/opt/QtPalmtop/bin/opie-sh 20OPIE_SH=$OPIEDIR/bin/opie-sh
21 21
22# there must be a better way to do this with sed, but i had no time 22# there must be a better way to do this with sed, but i had no time
23# time to look into this yet... 23# time to look into this yet...
24 24
25( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/fsmounter.png>" 25( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/fsmounter.png>"
26 echo "<h3>diskfree</h3> how much space is left ?<br>" 26 echo "<h3>diskfree</h3> how much space is left ?<br>"
27 echo "<p><table>" 27 echo "<p><table>"
28 28
29 df -h \ 29 df -h \
30 | grep -v "Mounted on" \ 30 | grep -v "Mounted on" \
31 | sed 's/ / /g' \ 31 | sed 's/ / /g' \
32 | sed 's/ / /g' \ 32 | sed 's/ / /g' \
33 | sed 's/ / /g' \ 33 | sed 's/ / /g' \
34 | sed 's/ / /g' \ 34 | sed 's/ / /g' \
35 | sed 's/ / /g' \ 35 | sed 's/ / /g' \
36 | sed 's/ / /g' \ 36 | sed 's/ / /g' \
37 | sed "s/ / /g" \ 37 | sed "s/ / /g" \
38 | cut -d " " -f4- \ 38 | cut -d " " -f4- \
39 | sed 's/ /<\/td><td>/g' \ 39 | sed 's/ /<\/td><td>/g' \
40 | sed 's/$/<\/td><\/tr>/' \ 40 | sed 's/$/<\/td><\/tr>/' \
41 | sed 's/^/<tr><td>/' ; echo "</table>" \ 41 | sed 's/^/<tr><td>/' ; echo "</table>" \
42 ) | $OPIE_SH -t "Space left" -f 42 ) | $OPIE_SH -t "Space left" -f
43 43
44rm -f /tmp/qcop-msg-diskfree.sh 44rm -f /tmp/qcop-msg-diskfree.sh
diff --git a/noncore/tools/opie-sh/scripts/filesystem_mounter.sh b/noncore/tools/opie-sh/scripts/filesystem_mounter.sh
index faaf37c..ba461a1 100755
--- a/noncore/tools/opie-sh/scripts/filesystem_mounter.sh
+++ b/noncore/tools/opie-sh/scripts/filesystem_mounter.sh
@@ -1,66 +1,66 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# filesystem_mounter.sh - a demonstration of opie-sh 3# filesystem_mounter.sh - a demonstration of opie-sh
4# 4#
5# Copyright (C) 2002 gonz@directbox.com 5# Copyright (C) 2002 gonz@directbox.com
6# 6#
7# This program is free software; you can redistribute it and/or modify 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 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) 9# the Free Software Foundation; either version 2, or (at your option)
10# any later version. 10# any later version.
11# 11#
12# This program is distributed in the hope that it will be useful, 12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 15# GNU General Public License for more details.
16# 16#
17# 20020524-2 - using df from diskfree now 17# 20020524-2 - using df from diskfree now
18# 20020524-1 - just code optix 18# 20020524-1 - just code optix
19# 20020519-1 - added information screen with manpage excerpt, added 19# 20020519-1 - added information screen with manpage excerpt, added
20# better returncode-checking 20# better returncode-checking
21# 20020517-2 - fixed output bug 21# 20020517-2 - fixed output bug
22# 20020517-1 - nicer fullscreen, added about, tried icon 22# 20020517-1 - nicer fullscreen, added about, tried icon
23# 23#
24 24
25OPIE_SH=/opt/QtPalmtop/bin/opie-sh 25OPIE_SH=$OPIEDIR/bin/opie-sh
26 26
27###################################################################### 27######################################################################
28# subroutines 28# subroutines
29 29
30about() { 30about() {
31 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/fsmounter.png>" 31 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/fsmounter.png>"
32 echo "<h3>About</h3>" 32 echo "<h3>About</h3>"
33 echo "This little App should make it possible for you to " 33 echo "This little App should make it possible for you to "
34 echo "easily mount and unmount filesystems from /etc/fstab" 34 echo "easily mount and unmount filesystems from /etc/fstab"
35 echo "<p>" 35 echo "<p>"
36 ) | $OPIE_SH -t fsmounter -f & 36 ) | $OPIE_SH -t fsmounter -f &
37 SCREENCLEAN=$! 37 SCREENCLEAN=$!
38 sleep 1 38 sleep 1
39} 39}
40 40
41beforemount() { 41beforemount() {
42 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/fsmounter.png>" 42 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/fsmounter.png>"
43 echo "<h3>mount or unmount $MOUNTPOINT ?</h3>" 43 echo "<h3>mount or unmount $MOUNTPOINT ?</h3>"
44 echo "<b>excerpt from MOUNT(8) manpage:</b><p>" 44 echo "<b>excerpt from MOUNT(8) manpage:</b><p>"
45 echo "All files accessible in a Unix system are arranged in one 45 echo "All files accessible in a Unix system are arranged in one
46 big tree, the file hierarchy, rooted at <b>/</b>. These files 46 big tree, the file hierarchy, rooted at <b>/</b>. These files
47 can be spread out over several devices. The <b>mount</b> command 47 can be spread out over several devices. The <b>mount</b> command
48 serves to attach the file system found on some device to 48 serves to attach the file system found on some device to
49 the big file tree. Conversely, the <b>umount(8)</b> command will 49 the big file tree. Conversely, the <b>umount(8)</b> command will
50 detach it again." 50 detach it again."
51 echo "<p>" 51 echo "<p>"
52 ) | $OPIE_SH -t fsmounter -f & 52 ) | $OPIE_SH -t fsmounter -f &
53 SCREENCLEAN2=$! 53 SCREENCLEAN2=$!
54 sleep 1 54 sleep 1
55} 55}
56 56
57 57
58cleanup() { 58cleanup() {
59 kill $SCREENCLEAN $SCREENCLEAN2 59 kill $SCREENCLEAN $SCREENCLEAN2
60 rm -f /tmp/qcop-msg-filesystem_mounter.sh 60 rm -f /tmp/qcop-msg-filesystem_mounter.sh
61} 61}
62 62
63get_action() { 63get_action() {
64# ask what to do (start/stop/status) 64# ask what to do (start/stop/status)
65# 65#
66$OPIE_SH -m -t "Select Action" \ 66$OPIE_SH -m -t "Select Action" \
@@ -79,48 +79,48 @@ kill $SCREENCLEAN2
79 79
80select_mountpoint() { 80select_mountpoint() {
81# present service list and choose 81# present service list and choose
82# 82#
83MOUNTPOINT=` cat /etc/fstab | cut -f1 \ 83MOUNTPOINT=` cat /etc/fstab | cut -f1 \
84 | cut -d " " -f1 \ 84 | cut -d " " -f1 \
85 | egrep -v "(tmpfs|proc|devpts|^#)" \ 85 | egrep -v "(tmpfs|proc|devpts|^#)" \
86 | $OPIE_SH -i -l \ 86 | $OPIE_SH -i -l \
87 -g -t "SELECT MOUNTPOINT" \ 87 -g -t "SELECT MOUNTPOINT" \
88 -L "select fs: " ` 88 -L "select fs: " `
89} 89}
90 90
91###################################################################### 91######################################################################
92# main 92# main
93 93
94about 94about
95select_mountpoint 95select_mountpoint
96beforemount 96beforemount
97get_action 97get_action
98 98
99if [ "$MOUNTPOINT" = "" ] 99if [ "$MOUNTPOINT" = "" ]
100then echo "ugly error...." | $OPIE_SH -f ; cleanup 100then echo "ugly error...." | $OPIE_SH -f ; cleanup
101fi 101fi
102 102
103( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/fsmounter.png>" 103( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/fsmounter.png>"
104 echo "<h3>Output of $ACTION $MOUNTPOINT :</h3>" 104 echo "<h3>Output of $ACTION $MOUNTPOINT :</h3>"
105 echo "<pre>" 105 echo "<pre>"
106 $ACTION $MOUNTPOINT 2>&1 106 $ACTION $MOUNTPOINT 2>&1
107 echo "</pre><p>" 107 echo "</pre><p>"
108 echo "<h3>diskfree</h3> how much space is left ?<br>" 108 echo "<h3>diskfree</h3> how much space is left ?<br>"
109 echo "<p><table>" 109 echo "<p><table>"
110 110
111 df -Ph \ 111 df -Ph \
112 | grep -v "Mounted on" \ 112 | grep -v "Mounted on" \
113 | sed 's/ / /g' \ 113 | sed 's/ / /g' \
114 | sed 's/ / /g' \ 114 | sed 's/ / /g' \
115 | sed 's/ / /g' \ 115 | sed 's/ / /g' \
116 | sed 's/ / /g' \ 116 | sed 's/ / /g' \
117 | sed 's/ / /g' \ 117 | sed 's/ / /g' \
118 | sed 's/ / /g' \ 118 | sed 's/ / /g' \
119 | sed "s/ / /g" \ 119 | sed "s/ / /g" \
120 | cut -d " " -f4- \ 120 | cut -d " " -f4- \
121 | sed 's/ /<\/td><td>/g' \ 121 | sed 's/ /<\/td><td>/g' \
122 | sed 's/$/<\/td><\/tr>/' \ 122 | sed 's/$/<\/td><\/tr>/' \
123 | sed 's/^/<tr><td>/' ; echo "</table>" \ 123 | sed 's/^/<tr><td>/' ; echo "</table>" \
124) | $OPIE_SH -f 124) | $OPIE_SH -f
125 125
126cleanup 126cleanup
diff --git a/noncore/tools/opie-sh/scripts/hostlist.sh b/noncore/tools/opie-sh/scripts/hostlist.sh
index 6d70793..d7c94f8 100755
--- a/noncore/tools/opie-sh/scripts/hostlist.sh
+++ b/noncore/tools/opie-sh/scripts/hostlist.sh
@@ -1,73 +1,73 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# hostlist.sh - a demonstration of opie-sh 3# hostlist.sh - a demonstration of opie-sh
4# 4#
5# Copyright (C) 2002 gonz@directbox.com 5# Copyright (C) 2002 gonz@directbox.com
6# 6#
7# This program is free software; you can redistribute it and/or modify 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 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) 9# the Free Software Foundation; either version 2, or (at your option)
10# any later version. 10# any later version.
11# 11#
12# This program is distributed in the hope that it will be useful, 12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 15# GNU General Public License for more details.
16# 16#
17# 20020524-1 - icon to hostlist 17# 20020524-1 - icon to hostlist
18# 20020517-1 - added icon, changed name in launcher 18# 20020517-1 - added icon, changed name in launcher
19# 19#
20 20
21CFG=/opt/QtPalmtop/share/config/hostlist.cfg 21CFG=$OPIEDIR/share/config/hostlist.cfg
22OPIE_SH=opie-sh 22OPIE_SH=opie-sh
23 23
24hostlist() { 24hostlist() {
25 (echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/hostlist.png>" 25 (echo "<img src=$OPIEDIR/pics/opie-sh-scripts/hostlist.png>"
26 echo "<h3>Hostlist</h3><br>" 26 echo "<h3>Hostlist</h3><br>"
27 HOSTLIST=`cat $CFG | grep -v '#'` 27 HOSTLIST=`cat $CFG | grep -v '#'`
28 for HOST in $HOSTLIST 28 for HOST in $HOSTLIST
29 do 29 do
30 PT=` ping -c 1 $HOST | grep avg|cut -d " " -f4-` 30 PT=` ping -c 1 $HOST | grep avg|cut -d " " -f4-`
31 if [ "$PT" != "" ] 31 if [ "$PT" != "" ]
32 then echo "<b><font color=#00ff00> " 32 then echo "<b><font color=#00ff00> "
33 echo "$HOST is up<br></font></b>[$PT]<br>" 33 echo "$HOST is up<br></font></b>[$PT]<br>"
34 else echo "<b><font color=#ff0000> " 34 else echo "<b><font color=#ff0000> "
35 echo "$HOST is down<br></font></b>[$PT]<br>" 35 echo "$HOST is down<br></font></b>[$PT]<br>"
36 fi 36 fi
37 done 37 done
38) | $OPIE_SH -t "Which are up ?" -f 38) | $OPIE_SH -t "Which are up ?" -f
39 39
40 40
41} 41}
42 42
43cleanup() { 43cleanup() {
44 kill $SCREENCLEAN 44 kill $SCREENCLEAN
45 rm -f /tmp/qcop-msg-hostlist.sh 45 rm -f /tmp/qcop-msg-hostlist.sh
46} 46}
47 47
48about() { 48about() {
49 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/hostlist.png>" 49 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/hostlist.png>"
50 echo "<h3>About</h3>" 50 echo "<h3>About</h3>"
51 echo "This little App should make it possible for you to " 51 echo "This little App should make it possible for you to "
52 echo "check some hosts for availability." 52 echo "check some hosts for availability."
53 echo "<p>" 53 echo "<p>"
54 ) | $OPIE_SH -t hostlist -f & 54 ) | $OPIE_SH -t hostlist -f &
55 SCREENCLEAN=$! 55 SCREENCLEAN=$!
56 sleep 1 56 sleep 1
57} 57}
58 58
59##################################################################### 59#####################################################################
60# 60#
61# main 61# main
62 62
63about 63about
64 64
65# ask to: start or edit list 65# ask to: start or edit list
66$OPIE_SH -m -g -t Hostlist -M "Welcome!" -0 Start -1 "Edit Hostlist" 66$OPIE_SH -m -g -t Hostlist -M "Welcome!" -0 Start -1 "Edit Hostlist"
67RETURNCODE=$? 67RETURNCODE=$?
68case $RETURNCODE in 68case $RETURNCODE in
69 -1)echo died unexpectedly... | $OPIE_SH -f 69 -1)echo died unexpectedly... | $OPIE_SH -f
70 cleanup 70 cleanup
71 exit ;; 71 exit ;;
721) textedit $CFG 721) textedit $CFG
73 cleanup ;; 73 cleanup ;;
diff --git a/noncore/tools/opie-sh/scripts/killproc.sh b/noncore/tools/opie-sh/scripts/killproc.sh
index 8afb4b8..6380200 100755
--- a/noncore/tools/opie-sh/scripts/killproc.sh
+++ b/noncore/tools/opie-sh/scripts/killproc.sh
@@ -1,71 +1,71 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# killproc.sh - a demonstration of opie-sh 3# killproc.sh - a demonstration of opie-sh
4# 4#
5# Copyright (C) 2002 gonz@directbox.com 5# Copyright (C) 2002 gonz@directbox.com
6# 6#
7# This program is free software; you can redistribute it and/or modify 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 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) 9# the Free Software Foundation; either version 2, or (at your option)
10# any later version. 10# any later version.
11# 11#
12# This program is distributed in the hope that it will be useful, 12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 15# GNU General Public License for more details.
16# 16#
17# 20020524-1 - code optix 17# 20020524-1 - code optix
18# 20020519-1 - added icon to output 18# 20020519-1 - added icon to output
19# 20020517-1 - nicer fullscreen, added about, tried icon 19# 20020517-1 - nicer fullscreen, added about, tried icon
20 20
21OPIE_SH=/opt/QtPalmtop/bin/opie-sh 21OPIE_SH=$OPIEDIR/bin/opie-sh
22 22
23###################################################################### 23######################################################################
24# subroutines 24# subroutines
25 25
26about() { 26about() {
27 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/killproc.png>" 27 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/killproc.png>"
28 echo "<h3>About</h3>" 28 echo "<h3>About</h3>"
29 echo "This little util sends the TERM signal " 29 echo "This little util sends the TERM signal "
30 echo "to the specified process or process group. " 30 echo "to the specified process or process group. "
31 echo "The TERM signal will kill processes which " 31 echo "The TERM signal will kill processes which "
32 echo "do not catch this signal. " 32 echo "do not catch this signal. "
33 echo "<p> " 33 echo "<p> "
34 ) | $OPIE_SH -t opie-killproc -f & 34 ) | $OPIE_SH -t opie-killproc -f &
35 SCREENCLEAN=$! 35 SCREENCLEAN=$!
36 sleep 1 36 sleep 1
37} 37}
38 38
39cleanup() { 39cleanup() {
40 kill $SCREENCLEAN 40 kill $SCREENCLEAN
41 rm -f /tmp/qcop-msg-killproc.sh 41 rm -f /tmp/qcop-msg-killproc.sh
42} 42}
43 43
44select_process() { 44select_process() {
45 # present process list and choose 45 # present process list and choose
46 # 46 #
47 PROCESS=`ps -eaf | cut -b 10-15,40- \ 47 PROCESS=`ps -eaf | cut -b 10-15,40- \
48 | cut -b -40 \ 48 | cut -b -40 \
49 | grep -v "TIME CMD" \ 49 | grep -v "TIME CMD" \
50 | $OPIE_SH -i -l -g \ 50 | $OPIE_SH -i -l -g \
51 -t "Select Process" ` 51 -t "Select Process" `
52} 52}
53 53
54###################################################################### 54######################################################################
55# main 55# main
56 56
57about 57about
58select_process 58select_process
59 59
60PROCESS=`echo $PROCESS | cut -b -4` 60PROCESS=`echo $PROCESS | cut -b -4`
61 61
62 62
63( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/killproc.png>" 63( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/killproc.png>"
64 echo "<h3>Output of kill $PROCESS</h3>" 64 echo "<h3>Output of kill $PROCESS</h3>"
65 echo "<pre>" 65 echo "<pre>"
66 kill $PROCESS 2>&1 66 kill $PROCESS 2>&1
67 echo "</pre><p>" 67 echo "</pre><p>"
68 echo done. 68 echo done.
69) | $OPIE_SH -f 69) | $OPIE_SH -f
70 70
71cleanup 71cleanup
diff --git a/noncore/tools/opie-sh/scripts/launcher_refresh.sh b/noncore/tools/opie-sh/scripts/launcher_refresh.sh
index 7850508..c3b0617 100755
--- a/noncore/tools/opie-sh/scripts/launcher_refresh.sh
+++ b/noncore/tools/opie-sh/scripts/launcher_refresh.sh
@@ -1,44 +1,44 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# launcher_refresh.sh - a demonstration of opie-sh 3# launcher_refresh.sh - a demonstration of opie-sh
4# 4#
5# Copyright (C) 2002 gonz@directbox.com 5# Copyright (C) 2002 gonz@directbox.com
6# 6#
7# This program is free software; you can redistribute it and/or modify 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 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) 9# the Free Software Foundation; either version 2, or (at your option)
10# any later version. 10# any later version.
11# 11#
12# This program is distributed in the hope that it will be useful, 12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 15# GNU General Public License for more details.
16 16
17OPIE_SH=opie-sh 17OPIE_SH=$OPIEDIR/bin/opie-sh
18 18
19launcher_refresh() { 19launcher_refresh() {
20 (echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/launcher_refresh.png>" 20 (echo "<img src=$OPIEDIR/pics/opie-sh-scripts/launcher_refresh.png>"
21 echo "<h3>Refresh successful!</h3><br>" 21 echo "<h3>Refresh successful!</h3><br>"
22 echo the launcher has been refreshed. 22 echo the launcher has been refreshed.
23 echo 23 echo
24 echo this is useful if you installed packages using ipk instead of 24 echo this is useful if you installed packages using ipk instead of
25 echo oipkg. it is also helping if you are changing .desktop-files 25 echo oipkg. it is also helping if you are changing .desktop-files
26 echo often. 26 echo often.
27 echo "<p>" it also refreshes the input-methods. 27 echo "<p>" it also refreshes the input-methods.
28) | $OPIE_SH -t "launcher-refresh" -f 28) | $OPIE_SH -t "launcher-refresh" -f
29} 29}
30 30
31cleanup() { 31cleanup() {
32 rm -f /tmp/qcop-msg-launcher_refresh.sh 32 rm -f /tmp/qcop-msg-launcher_refresh.sh
33} 33}
34 34
35##################################################################### 35#####################################################################
36# 36#
37# main 37# main
38 38
39/opt/QtPalmtop/bin/qcop QPE/TaskBar "reloadInputMethods()" 39$OPIEDIR/bin/qcop QPE/TaskBar "reloadInputMethods()"
40#/opt/QtPalmtop/bin/qcop QPE/System "restart()" 40#$OPIEDIR/bin/qcop QPE/System "restart()"
41/opt/QtPalmtop/bin/qcop QPE/System "linkChanged(QString)" 41$OPIEDIR/bin/qcop QPE/System "linkChanged(QString)"
42 42
43launcher_refresh 43launcher_refresh
44cleanup 44cleanup
diff --git a/noncore/tools/opie-sh/scripts/logviewer.sh b/noncore/tools/opie-sh/scripts/logviewer.sh
index e9657b4..9b5dc25 100755
--- a/noncore/tools/opie-sh/scripts/logviewer.sh
+++ b/noncore/tools/opie-sh/scripts/logviewer.sh
@@ -1,51 +1,51 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# logviewer.sh - a demonstration of opie-sh 3# logviewer.sh - a demonstration of opie-sh
4# 4#
5# Copyright (C) 2002 gonz@directbox.com 5# Copyright (C) 2002 gonz@directbox.com
6# 6#
7# This program is free software; you can redistribute it and/or modify 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 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) 9# the Free Software Foundation; either version 2, or (at your option)
10# any later version. 10# any later version.
11# 11#
12# This program is distributed in the hope that it will be useful, 12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 15# GNU General Public License for more details.
16# 16#
17# 20020526-1a - initial release... 17# 20020526-1a - initial release...
18# 18#
19 19
20OPIE_SH=/opt/QtPalmtop/bin/opie-sh 20OPIE_SH=$OPIEDIR/bin/opie-sh
21INITPATH=/etc/init.d 21INITPATH=/etc/init.d
22 22
23###################################################################### 23######################################################################
24# subroutines 24# subroutines
25 25
26about() { 26about() {
27 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/logviewer.png>" 27 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/logviewer.png>"
28 echo "<h3>About</h3>" 28 echo "<h3>About</h3>"
29 echo "This little App should make it possible for you to " 29 echo "This little App should make it possible for you to "
30 echo "easily have a look at some of the syslogs. " 30 echo "easily have a look at some of the syslogs. "
31 echo "<p>" 31 echo "<p>"
32 ) | $OPIE_SH -t logviewer -f & 32 ) | $OPIE_SH -t logviewer -f &
33 SCREENCLEAN=$! 33 SCREENCLEAN=$!
34 sleep 1 34 sleep 1
35} 35}
36 36
37cleanup() { 37cleanup() {
38 kill $SCREENCLEAN 2>/dev/null 38 kill $SCREENCLEAN 2>/dev/null
39 rm -f /tmp/qcop-msg-logviewer.sh 39 rm -f /tmp/qcop-msg-logviewer.sh
40} 40}
41 41
42choose_log() { 42choose_log() {
43 # ask what to do (start/stop/status) 43 # ask what to do (start/stop/status)
44 # 44 #
45 $OPIE_SH -m -t "Select Log" \ 45 $OPIE_SH -m -t "Select Log" \
46 -M "which logfile are you interested in ?<br>" \ 46 -M "which logfile are you interested in ?<br>" \
47 -g -0 "PROC" -1 "SYSLOG" 47 -g -0 "PROC" -1 "SYSLOG"
48 RETURNCODE=$? 48 RETURNCODE=$?
49 49
50 case $RETURNCODE in 50 case $RETURNCODE in
51 -1) echo unexpected input detected, exiting. 51 -1) echo unexpected input detected, exiting.
@@ -53,62 +53,62 @@ choose_log() {
53 0) LOGMETHOD=proc ;; 53 0) LOGMETHOD=proc ;;
54 1) LOGMETHOD=syslog ;; 54 1) LOGMETHOD=syslog ;;
55 esac 55 esac
56} 56}
57 57
58###################################################################### 58######################################################################
59# main 59# main
60 60
61about 61about
62choose_log 62choose_log
63 63
64case $LOGMETHOD in 64case $LOGMETHOD in
65 proc) $OPIE_SH -m -t "Select Log" \ 65 proc) $OPIE_SH -m -t "Select Log" \
66 -M "which procfile ?<br>" \ 66 -M "which procfile ?<br>" \
67 -g -0 kmsg -1 "ksyms" 67 -g -0 kmsg -1 "ksyms"
68 RETURNCODE=$? 68 RETURNCODE=$?
69 case $RETURNCODE in 69 case $RETURNCODE in
70 -1) cleanup ;; 70 -1) cleanup ;;
71 0) 71 0)
72 72
73cat /proc/kmsg >/tmp/log.$$ & 73cat /proc/kmsg >/tmp/log.$$ &
74PID=$! 74PID=$!
75sleep 2 75sleep 2
76kill $PID 76kill $PID
77( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/logviewer.png>" 77( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/logviewer.png>"
78 echo "<h3>/proc/kmsg</h3>" 78 echo "<h3>/proc/kmsg</h3>"
79 cat /tmp/log.$$ 79 cat /tmp/log.$$
80) | $OPIE_SH -t kmsg -f 80) | $OPIE_SH -t kmsg -f
81rm -f /tmp/$$ 81rm -f /tmp/$$
82cleanup ;; 82cleanup ;;
83 83
84 1) 84 1)
85 85
86cat /proc/ksyms >/tmp/log.$$ & 86cat /proc/ksyms >/tmp/log.$$ &
87PID=$! 87PID=$!
88sleep 2 88sleep 2
89kill $PID 89kill $PID
90( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/logviewer.png>" 90( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/logviewer.png>"
91 echo "<h3>/proc/ksyms</h3>" 91 echo "<h3>/proc/ksyms</h3>"
92 cat /tmp/log.$$ 92 cat /tmp/log.$$
93) | $OPIE_SH -t ksyms -f 93) | $OPIE_SH -t ksyms -f
94rm -f /tmp/$$ 94rm -f /tmp/$$
95cleanup ;; 95cleanup ;;
96 96
97 *) cleanup ;; 97 *) cleanup ;;
98 esac 98 esac
99 cleanup ;; 99 cleanup ;;
100 100
101 syslog) 101 syslog)
102 102
103if [ -f /var/log/messages ] 103if [ -f /var/log/messages ]
104then 104then
105 $OPIE_SH -t syslog -f /var/log/messages 105 $OPIE_SH -t syslog -f /var/log/messages
106else 106else
107 echo "no syslogd installed or /var/log/messages inexistent." \ 107 echo "no syslogd installed or /var/log/messages inexistent." \
108 | $OPIE_SH -t syslog -f 108 | $OPIE_SH -t syslog -f
109fi 109fi
110;; 110;;
111 *) cleanup ;; 111 *) cleanup ;;
112 esac 112 esac
113 113
114 114
diff --git a/noncore/tools/opie-sh/scripts/opie-sh-ssh-askpass.sh b/noncore/tools/opie-sh/scripts/opie-sh-ssh-askpass.sh
index 7e1e7ad..7d13345 100755
--- a/noncore/tools/opie-sh/scripts/opie-sh-ssh-askpass.sh
+++ b/noncore/tools/opie-sh/scripts/opie-sh-ssh-askpass.sh
@@ -1,8 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# opie-sh-ssh-askpass -- ssh-askpass utility using opie-sh 3# opie-sh-ssh-askpass -- ssh-askpass utility using opie-sh
4 4
5OPIE_SH=opie-sh 5OPIE_SH=$OPIEDIR/bin/opie-sh
6 6
7exec $OPIE_SH -i -p -t "OpenSSH" -g -L "<SMALL>$@" 2>/dev/null 7exec $OPIE_SH -i -p -t "OpenSSH" -g -L "<SMALL>$@" 2>/dev/null
8 8
diff --git a/noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.sh b/noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.sh
index 13a1e79..49c62c4 100755
--- a/noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.sh
+++ b/noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.sh
@@ -1,49 +1,49 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# wavelanchooser.sh - a demonstration of opie-sh 3# wavelanchooser.sh - a demonstration of opie-sh
4# 4#
5# Copyright (C) 2002 gonz@directbox.com 5# Copyright (C) 2002 gonz@directbox.com
6# 6#
7# This program is free software; you can redistribute it and/or modify 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 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) 9# the Free Software Foundation; either version 2, or (at your option)
10# any later version. 10# any later version.
11# 11#
12# This program is distributed in the hope that it will be useful, 12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 15# GNU General Public License for more details.
16# 16#
17# 20020528-1 - fixed filename in cleanup 17# 20020528-1 - fixed filename in cleanup
18# 20020526-1 - rudimental but working 18# 20020526-1 - rudimental but working
19# 20020524-1 - initial working release planned 19# 20020524-1 - initial working release planned
20# 20#
21 21
22OPIE_SH=opie-sh 22OPIE_SH=$OPIEDIR/bin/opie-sh
23 23
24about() { 24about() {
25 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/qtwavelan.png>" 25 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/qtwavelan.png>"
26 echo "<h3>About</h3>" 26 echo "<h3>About</h3>"
27 echo "This little App is for changing the location setting" 27 echo "This little App is for changing the location setting"
28 echo "for your wireless card. <br>" 28 echo "for your wireless card. <br>"
29 echo "actually it only starts /etc/init.d/[home|work] and can" 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" 30 echo "be easily turned into a quick program to start the service"
31 echo "or init script you use most." 31 echo "or init script you use most."
32 echo "<p>" 32 echo "<p>"
33 ) | $OPIE_SH -t wavelanchooser -f & 33 ) | $OPIE_SH -t wavelanchooser -f &
34 SCREENCLEAN=$! 34 SCREENCLEAN=$!
35 sleep 1 35 sleep 1
36} 36}
37 37
38cleanup() { 38cleanup() {
39 kill $SCREENCLEAN $SCREENCLEAN2 39 kill $SCREENCLEAN $SCREENCLEAN2
40 rm -f /tmp/qcop-msg-opie-sh-wavelanchooser.sh 40 rm -f /tmp/qcop-msg-opie-sh-wavelanchooser.sh
41} 41}
42 42
43 43
44about 44about
45 45
46# choose if work or home 46# choose if work or home
47 $OPIE_SH -m -t "network-settings dialog" \ 47 $OPIE_SH -m -t "network-settings dialog" \
48 -M "which configuration do you want ? " \ 48 -M "which configuration do you want ? " \
49 -w -0 home -1 work -g 49 -w -0 home -1 work -g
diff --git a/noncore/tools/opie-sh/scripts/rsyncme.sh b/noncore/tools/opie-sh/scripts/rsyncme.sh
index c09aea8..3d56c12 100755
--- a/noncore/tools/opie-sh/scripts/rsyncme.sh
+++ b/noncore/tools/opie-sh/scripts/rsyncme.sh
@@ -1,45 +1,45 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# rsyncme.sh - a demonstration of opie-sh 3# rsyncme.sh - a demonstration of opie-sh
4# 4#
5# Copyright (C) 2002 gonz@directbox.com 5# Copyright (C) 2002 gonz@directbox.com
6# 6#
7# This program is free software; you can redistribute it and/or modify 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 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) 9# the Free Software Foundation; either version 2, or (at your option)
10# any later version. 10# any later version.
11# 11#
12# This program is distributed in the hope that it will be useful, 12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 15# GNU General Public License for more details.
16# 16#
17# 20020517-1 - added icon, changed name in launcher 17# 20020517-1 - added icon, changed name in launcher
18# 18#
19 19
20CFG=/opt/QtPalmtop/share/config/rsyncme.cfg 20CFG=$OPIEDIR/share/config/rsyncme.cfg
21OPIE_SH=opie-sh 21OPIE_SH=$OPIEDIR/bin/opie-sh
22 22
23update_cfg() { 23update_cfg() {
24 # check if dir is in CFG and if not add it 24 # check if dir is in CFG and if not add it
25 if [ "`grep -c $DIR $CFG`" = "0" ] 25 if [ "`grep -c $DIR $CFG`" = "0" ]
26 thenecho $DIR >>$CFG 26 thenecho $DIR >>$CFG
27 fi 27 fi
28} 28}
29 29
30ask_dirs() { 30ask_dirs() {
31 # get source and destination dir 31 # get source and destination dir
32 DIR=`$OPIE_SH -g -i -t "Choose Source Directory" -l -L DIR: -E -F $CFG ` 32 DIR=`$OPIE_SH -g -i -t "Choose Source Directory" -l -L DIR: -E -F $CFG `
33 update_cfg 33 update_cfg
34 SRCDIR=$DIR 34 SRCDIR=$DIR
35 35
36 DIR=`$OPIE_SH -g -i -t "Choose Destination Directory" -l -L DIR: -E -F $CFG ` 36 DIR=`$OPIE_SH -g -i -t "Choose Destination Directory" -l -L DIR: -E -F $CFG `
37 update_cfg 37 update_cfg
38 DESTDIR=$DIR 38 DESTDIR=$DIR
39} 39}
40 40
41ask_options() { 41ask_options() {
42 # now ask for options 42 # now ask for options
43 OPTIONS="--archive --verbose --checksum --recursive --update --links --partial --dry-run --rsh=ssh --existing --compress --recursive" 43 OPTIONS="--archive --verbose --checksum --recursive --update --links --partial --dry-run --rsh=ssh --existing --compress --recursive"
44 OUTPUT=`( for OPTION in $OPTIONS 44 OUTPUT=`( for OPTION in $OPTIONS
45 do 45 do
@@ -47,49 +47,49 @@ ask_options() {
47 done ) | $OPIE_SH -t "Select options" -g -i -b -F ` 47 done ) | $OPIE_SH -t "Select options" -g -i -b -F `
48} 48}
49 49
50rsync_output() { 50rsync_output() {
51 ( echo "<h3>Output of your rsync:</h3>" 51 ( echo "<h3>Output of your rsync:</h3>"
52 echo "command: rsync $OUTPUT $SRCDIR $DESTDIR" 52 echo "command: rsync $OUTPUT $SRCDIR $DESTDIR"
53 echo "<pre>" 53 echo "<pre>"
54 rsync $OUTPUT $SRCDIR $DESTDIR 2>&1 54 rsync $OUTPUT $SRCDIR $DESTDIR 2>&1
55 echo "</pre>done." 55 echo "</pre>done."
56 ) | $OPIE_SH -t "Result:" -f 56 ) | $OPIE_SH -t "Result:" -f
57} 57}
58 58
59cleanup() { 59cleanup() {
60 kill $SCREENCLEAN 60 kill $SCREENCLEAN
61 rm -f /tmp/qcop-msg-rsyncme.sh 61 rm -f /tmp/qcop-msg-rsyncme.sh
62} 62}
63 63
64show_dirs() { 64show_dirs() {
65 ( echo "<h3>Directorys chosen for sync:</h3>" 65 ( echo "<h3>Directorys chosen for sync:</h3>"
66 echo "<ul><li>$SRCDIR<li>$DESTDIR</ul>" ) \ 66 echo "<ul><li>$SRCDIR<li>$DESTDIR</ul>" ) \
67 | $OPIE_SH -t "Got directories" -f 67 | $OPIE_SH -t "Got directories" -f
68} 68}
69 69
70about() { 70about() {
71 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/rsyncme.png>" 71 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/rsyncme.png>"
72 echo "<h3>About</h3>" 72 echo "<h3>About</h3>"
73 echo "This little App should make it possible for you to " 73 echo "This little App should make it possible for you to "
74 echo "easily choose the wanted options for an rsync process." 74 echo "easily choose the wanted options for an rsync process."
75 echo "<p>" 75 echo "<p>"
76 ) | $OPIE_SH -t rsync-helper -f & 76 ) | $OPIE_SH -t rsync-helper -f &
77 SCREENCLEAN=$! 77 SCREENCLEAN=$!
78 sleep 1 78 sleep 1
79} 79}
80 80
81 81
82 82
83 83
84##################################################################### 84#####################################################################
85# 85#
86# main 86# main
87 87
88about 88about
89 89
90# ask to: start rsync, edit dirlist, show about 90# ask to: start rsync, edit dirlist, show about
91$OPIE_SH -m -g -t RsyncMe -M "Welcome!" -0 Start -1 Dirlist 91$OPIE_SH -m -g -t RsyncMe -M "Welcome!" -0 Start -1 Dirlist
92RETURNCODE=$? 92RETURNCODE=$?
93case $RETURNCODE in 93case $RETURNCODE in
94 -1)echo died unexpectedly... | $OPIE_SH -f 94 -1)echo died unexpectedly... | $OPIE_SH -f
95 cleanup 95 cleanup
diff --git a/noncore/tools/opie-sh/scripts/service_manager.sh b/noncore/tools/opie-sh/scripts/service_manager.sh
index d1423a5..e3c04bc 100755
--- a/noncore/tools/opie-sh/scripts/service_manager.sh
+++ b/noncore/tools/opie-sh/scripts/service_manager.sh
@@ -1,89 +1,89 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# service_manager.sh - a demonstration of opie-sh 3# service_manager.sh - a demonstration of opie-sh
4# 4#
5# Copyright (C) 2002 gonz@directbox.com 5# Copyright (C) 2002 gonz@directbox.com
6# 6#
7# This program is free software; you can redistribute it and/or modify 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 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) 9# the Free Software Foundation; either version 2, or (at your option)
10# any later version. 10# any later version.
11# 11#
12# This program is distributed in the hope that it will be useful, 12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 15# GNU General Public License for more details.
16# 16#
17# 20020524-1 - added icon to statusinfo... 17# 20020524-1 - added icon to statusinfo...
18# 20020518-1 - optix 18# 20020518-1 - optix
19# 20020517-1 - added about and fullscreen 19# 20020517-1 - added about and fullscreen
20# 20#
21 21
22OPIE_SH=/opt/QtPalmtop/bin/opie-sh 22OPIE_SH=$OPIEDIR/bin/opie-sh
23INITPATH=/etc/init.d 23INITPATH=/etc/init.d
24 24
25###################################################################### 25######################################################################
26# subroutines 26# subroutines
27 27
28about() { 28about() {
29 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/service_manager.png>" 29 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/service_manager.png>"
30 echo "<h3>About</h3>" 30 echo "<h3>About</h3>"
31 echo "This little App should make it possible for you to " 31 echo "This little App should make it possible for you to "
32 echo "easily start and stop services in /etc/init.d." 32 echo "easily start and stop services in /etc/init.d."
33 echo "<p>" 33 echo "<p>"
34 ) | $OPIE_SH -t service-manager -f & 34 ) | $OPIE_SH -t service-manager -f &
35 SCREENCLEAN=$! 35 SCREENCLEAN=$!
36 sleep 1 36 sleep 1
37} 37}
38 38
39cleanup() { 39cleanup() {
40 kill $SCREENCLEAN 40 kill $SCREENCLEAN
41 rm -f /tmp/qcop-msg-service_manager.sh 41 rm -f /tmp/qcop-msg-service_manager.sh
42} 42}
43 43
44get_action() { 44get_action() {
45 # ask what to do (start/stop/status) 45 # ask what to do (start/stop/status)
46 # 46 #
47 $OPIE_SH -m -t "Select Action" \ 47 $OPIE_SH -m -t "Select Action" \
48 -M "which action do you want to do to $SERVICE ?<br>" \ 48 -M "which action do you want to do to $SERVICE ?<br>" \
49 -g -0 start -1 stop -2 status 49 -g -0 start -1 stop -2 status
50 RETURNCODE=$? 50 RETURNCODE=$?
51 51
52 case $RETURNCODE in 52 case $RETURNCODE in
53 -1) echo unexpected input detected, exiting. 53 -1) echo unexpected input detected, exiting.
54 exit ;; 54 exit ;;
55 0) ACTION=start ;; 55 0) ACTION=start ;;
56 1) ACTION=stop ;; 56 1) ACTION=stop ;;
57 2) ACTION=status ;; 57 2) ACTION=status ;;
58 esac 58 esac
59} 59}
60 60
61status_disclaimer() { 61status_disclaimer() {
62 # tell that init scripts are not too standard 62 # tell that init scripts are not too standard
63 # 63 #
64 cat | $OPIE_SH -f <<EOT 64 cat | $OPIE_SH -f <<EOT
65<img src=/opt/QtPalmtop/pics/opie-sh-scripts/service_manager.png> 65<img src=$OPIEDIR/pics/opie-sh-scripts/service_manager.png>
66<h3>status has been disabled</h3> 66<h3>status has been disabled</h3>
67 67
68 the status service has been disabled 68 the status service has been disabled
69 because it is not supported by the 69 because it is not supported by the
70 most init scripts that come with 70 most init scripts that come with
71 familiar ...<p> 71 familiar ...<p>
72 72
73 perhaps it will be replaced with 73 perhaps it will be replaced with
74 something more useful in the future... 74 something more useful in the future...
75EOT 75EOT
76} 76}
77 77
78select_service() { 78select_service() {
79 # present service list and choose 79 # present service list and choose
80 # 80 #
81 cd $INITPATH/ 81 cd $INITPATH/
82 SERVICE=` ls -1 | $OPIE_SH -i -l \ 82 SERVICE=` ls -1 | $OPIE_SH -i -l \
83 -g -t "Select Service" \ 83 -g -t "Select Service" \
84 ` 84 `
85 cd - 85 cd -
86} 86}
87 87
88###################################################################### 88######################################################################
89# main 89# main
diff --git a/noncore/tools/opie-sh/scripts/stowctrl.sh b/noncore/tools/opie-sh/scripts/stowctrl.sh
index 475c3a3..20cb6ae 100755
--- a/noncore/tools/opie-sh/scripts/stowctrl.sh
+++ b/noncore/tools/opie-sh/scripts/stowctrl.sh
@@ -1,73 +1,73 @@
1#!/bin/sh 1#!/bin/sh
2 2
3#stowctrl.sh - modified usbnetctrl.sh from gonz by spiralman spiralman@softhome.net 3#stowctrl.sh - modified usbnetctrl.sh from gonz by spiralman spiralman@softhome.net
4# usbnetctrl.sh - a demonstration of opie-sh 4# usbnetctrl.sh - a demonstration of opie-sh
5# 5#
6# Copyright (C) 2002 gonz@directbox.com 6# Copyright (C) 2002 gonz@directbox.com
7# 7#
8# This program is free software; you can redistribute it and/or modify 8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by 9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2, or (at your option) 10# the Free Software Foundation; either version 2, or (at your option)
11# any later version. 11# any later version.
12# 12#
13# This program is distributed in the hope that it will be useful, 13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details. 16# GNU General Public License for more details.
17# 17#
18# 20020524-1 - code beautification, added icons and reset 18# 20020524-1 - code beautification, added icons and reset
19# 20020517-2 - bugfixed fullscreen, added info about ifconfig 19# 20020517-2 - bugfixed fullscreen, added info about ifconfig
20# 20020517-1 - added about, fullscreen and icon 20# 20020517-1 - added about, fullscreen and icon
21 21
22OPIE_SH=/opt/QtPalmtop/bin/opie-sh 22OPIE_SH=$OPIEDIR/bin/opie-sh
23 23
24###################################################################### 24######################################################################
25# subroutines 25# subroutines
26 26
27about() { 27about() {
28 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/stowctrl.png>" 28 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/stowctrl.png>"
29 echo "<h3>About</h3>" 29 echo "<h3>About</h3>"
30 echo "This little App should make it easy for you to " 30 echo "This little App should make it easy for you to "
31 echo "activate / deactivate the stowaway keyboard (on ipaq)" 31 echo "activate / deactivate the stowaway keyboard (on ipaq)"
32 echo "<p>" 32 echo "<p>"
33 ) | $OPIE_SH -t "stowaway control" -f & 33 ) | $OPIE_SH -t "stowaway control" -f &
34 SCREENCLEAN=$! 34 SCREENCLEAN=$!
35 sleep 1 35 sleep 1
36} 36}
37 37
38startup() { 38startup() {
39 echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/stowctrl.png>" > /tmp/sout 39 echo "<img src=$OPIEDIR/pics/opie-sh-scripts/stowctrl.png>" > /tmp/sout
40 echo "<h3>stowaway up</h3>" >> /tmp/sout 40 echo "<h3>stowaway up</h3>" >> /tmp/sout
41 modprobe h3600_stowaway >> /tmp/sout 41 modprobe h3600_stowaway >> /tmp/sout
42 cat /dev/stowaway & 42 cat /dev/stowaway &
43 echo $! > /tmp/stowcatpid 43 echo $! > /tmp/stowcatpid
44 $OPIE_SH -t Output -f /tmp/sout 44 $OPIE_SH -t Output -f /tmp/sout
45 rm /tmp/sout 45 rm /tmp/sout
46} 46}
47 47
48stopit() { 48stopit() {
49 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/stowctrl.png>" 49 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/stowctrl.png>"
50 echo "<h3>stowaway down</h3>" 50 echo "<h3>stowaway down</h3>"
51 read THECAT < /tmp/stowcatpid 51 read THECAT < /tmp/stowcatpid
52 kill $THECAT 52 kill $THECAT
53 rmmod h3600_stowaway 53 rmmod h3600_stowaway
54 ) 2>&1 | $OPIE_SH -t Output -f 54 ) 2>&1 | $OPIE_SH -t Output -f
55} 55}
56 56
57 57
58cleanup() { 58cleanup() {
59 kill $SCREENCLEAN 59 kill $SCREENCLEAN
60 rm -f /tmp/qcop-msg-stowctrl.sh 60 rm -f /tmp/qcop-msg-stowctrl.sh
61} 61}
62 62
63 63
64yesorno() { 64yesorno() {
65 $OPIE_SH -m -t "Stowaway Up/Down" -M "What to do with the Stowaway: " \ 65 $OPIE_SH -m -t "Stowaway Up/Down" -M "What to do with the Stowaway: " \
66 -g -0 Up -1 Down -2 Restart 66 -g -0 Up -1 Down -2 Restart
67 RETURNCODE=$? 67 RETURNCODE=$?
68 68
69 case $RETURNCODE in 69 case $RETURNCODE in
70 -1) echo error... 70 -1) echo error...
71 cleanup 71 cleanup
72 exit ;; 72 exit ;;
73 0) startup ;; 73 0) startup ;;
diff --git a/noncore/tools/opie-sh/scripts/usbnetctrl.sh b/noncore/tools/opie-sh/scripts/usbnetctrl.sh
index 417435e..af68a3d 100755
--- a/noncore/tools/opie-sh/scripts/usbnetctrl.sh
+++ b/noncore/tools/opie-sh/scripts/usbnetctrl.sh
@@ -1,82 +1,82 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# usbnetctrl.sh - a demonstration of opie-sh 3# usbnetctrl.sh - a demonstration of opie-sh
4# 4#
5# Copyright (C) 2002 gonz@directbox.com 5# Copyright (C) 2002 gonz@directbox.com
6# 6#
7# This program is free software; you can redistribute it and/or modify 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 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) 9# the Free Software Foundation; either version 2, or (at your option)
10# any later version. 10# any later version.
11# 11#
12# This program is distributed in the hope that it will be useful, 12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 15# GNU General Public License for more details.
16# 16#
17# 20020524-1 - code beautification, added icons and reset 17# 20020524-1 - code beautification, added icons and reset
18# 20020517-2 - bugfixed fullscreen, added info about ifconfig 18# 20020517-2 - bugfixed fullscreen, added info about ifconfig
19# 20020517-1 - added about, fullscreen and icon 19# 20020517-1 - added about, fullscreen and icon
20 20
21OPIE_SH=/opt/QtPalmtop/bin/opie-sh 21OPIE_SH=$OPIEDIR/bin/opie-sh
22 22
23###################################################################### 23######################################################################
24# subroutines 24# subroutines
25 25
26about() { 26about() {
27 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/usbnetctrl.png>" 27 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/usbnetctrl.png>"
28 echo "<h3>About</h3>" 28 echo "<h3>About</h3>"
29 echo "This little App should make it easy for you to " 29 echo "This little App should make it easy for you to "
30 echo "activate / deactivate the usbnet-driver (on ipaq)" 30 echo "activate / deactivate the usbnet-driver (on ipaq)"
31 echo "<p>" 31 echo "<p>"
32 echo "To use it at first, you need to change the ifconfig" 32 echo "To use it at first, you need to change the ifconfig"
33 echo "line in /opt/QtPalmtop/bin/usbnetctrl.sh." 33 echo "line in $OPIEDIR/bin/usbnetctrl.sh."
34 ) | $OPIE_SH -t "usbnet control" -f & 34 ) | $OPIE_SH -t "usbnet control" -f &
35 SCREENCLEAN=$! 35 SCREENCLEAN=$!
36 sleep 1 36 sleep 1
37} 37}
38 38
39startup() { 39startup() {
40 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/usbnetctrl.png>" 40 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/usbnetctrl.png>"
41 echo "<h3>usbnet up</h3>" 41 echo "<h3>usbnet up</h3>"
42 modprobe usb-eth 42 modprobe usb-eth
43 ) 2>&1 | $OPIE_SH -t Output -f 43 ) 2>&1 | $OPIE_SH -t Output -f
44 44
45 $OPIE_SH -m -I -t "Usbnet Control" -M "Please connect the<br>ipaq to the cradle<br>and press OK" 45 $OPIE_SH -m -I -t "Usbnet Control" -M "Please connect the<br>ipaq to the cradle<br>and press OK"
46 46
47 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/usbnetctrl.png>" 47 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/usbnetctrl.png>"
48 echo "<h3>usbnet up</h3>" 48 echo "<h3>usbnet up</h3>"
49 ifconfig usbf up 192.168.0.1 netmask 255.255.255.0 49 ifconfig usbf up 192.168.0.1 netmask 255.255.255.0
50 50
51 ) 2>&1 | $OPIE_SH -t Output -f 51 ) 2>&1 | $OPIE_SH -t Output -f
52 if [ -f /root/masq.sh ] 52 if [ -f /root/masq.sh ]
53 then sh /root/masq.sh 53 then sh /root/masq.sh
54 fi 54 fi
55} 55}
56 56
57stopit() { 57stopit() {
58 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/usbnetctrl.png>" 58 ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/usbnetctrl.png>"
59 echo "<h3>usbnet down</h3>" 59 echo "<h3>usbnet down</h3>"
60 ifconfig usbf down 60 ifconfig usbf down
61 sleep 1 61 sleep 1
62 rmmod usb-eth 62 rmmod usb-eth
63 rmmod sa1100usb_core 63 rmmod sa1100usb_core
64 ) 2>&1 | $OPIE_SH -t Output -f 64 ) 2>&1 | $OPIE_SH -t Output -f
65} 65}
66 66
67 67
68cleanup() { 68cleanup() {
69 kill $SCREENCLEAN 69 kill $SCREENCLEAN
70 rm -f /tmp/qcop-msg-usbnetctrl.sh 70 rm -f /tmp/qcop-msg-usbnetctrl.sh
71} 71}
72 72
73 73
74yesorno() { 74yesorno() {
75 $OPIE_SH -m -t "USB-Net start/stop" -M "What to do with usbnet: " \ 75 $OPIE_SH -m -t "USB-Net start/stop" -M "What to do with usbnet: " \
76 -g -0 Start -1 Stop -2 Restart 76 -g -0 Start -1 Stop -2 Restart
77 RETURNCODE=$? 77 RETURNCODE=$?
78 78
79 case $RETURNCODE in 79 case $RETURNCODE in
80 -1) echo error... 80 -1) echo error...
81 cleanup 81 cleanup
82 exit ;; 82 exit ;;