summaryrefslogtreecommitdiff
authorzecke <zecke>2004-08-14 12:05:39 (UTC)
committer zecke <zecke>2004-08-14 12:05:39 (UTC)
commit3df06db9e6fd268c7d234be05b01a2303dc0f7ba (patch) (side-by-side diff)
tree6a642674a0a69729c207337e63e20b8e02f40ec4
parent7cee03c63afadac76e87e276a5ef7b1bba27847b (diff)
downloadopie-3df06db9e6fd268c7d234be05b01a2303dc0f7ba.zip
opie-3df06db9e6fd268c7d234be05b01a2303dc0f7ba.tar.gz
opie-3df06db9e6fd268c7d234be05b01a2303dc0f7ba.tar.bz2
Do not hardcode /opt/QtPalmtop but use $OPIEDIR
Diffstat (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 @@
#!/bin/sh
# diskfree.sh - a demonstration of opie-sh
#
# Copyright (C) 2002 gonz@directbox.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 20020524-5 - bugfix
# 20020524-1 - initial release
-OPIE_SH=/opt/QtPalmtop/bin/opie-sh
+OPIE_SH=$OPIEDIR/bin/opie-sh
# there must be a better way to do this with sed, but i had no time
# time to look into this yet...
-( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/fsmounter.png>"
+( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/fsmounter.png>"
echo "<h3>diskfree</h3> how much space is left ?<br>"
echo "<p><table>"
df -h \
| grep -v "Mounted on" \
| sed 's/ / /g' \
| sed 's/ / /g' \
| sed 's/ / /g' \
| sed 's/ / /g' \
| sed 's/ / /g' \
| sed 's/ / /g' \
| sed "s/ / /g" \
| cut -d " " -f4- \
| sed 's/ /<\/td><td>/g' \
| sed 's/$/<\/td><\/tr>/' \
| sed 's/^/<tr><td>/' ; echo "</table>" \
) | $OPIE_SH -t "Space left" -f
rm -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 @@
#!/bin/sh
# filesystem_mounter.sh - a demonstration of opie-sh
#
# Copyright (C) 2002 gonz@directbox.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 20020524-2 - using df from diskfree now
# 20020524-1 - just code optix
# 20020519-1 - added information screen with manpage excerpt, added
# better returncode-checking
# 20020517-2 - fixed output bug
# 20020517-1 - nicer fullscreen, added about, tried icon
#
-OPIE_SH=/opt/QtPalmtop/bin/opie-sh
+OPIE_SH=$OPIEDIR/bin/opie-sh
######################################################################
# subroutines
about() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/fsmounter.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/fsmounter.png>"
echo "<h3>About</h3>"
echo "This little App should make it possible for you to "
echo "easily mount and unmount filesystems from /etc/fstab"
echo "<p>"
) | $OPIE_SH -t fsmounter -f &
SCREENCLEAN=$!
sleep 1
}
beforemount() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/fsmounter.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/fsmounter.png>"
echo "<h3>mount or unmount $MOUNTPOINT ?</h3>"
echo "<b>excerpt from MOUNT(8) manpage:</b><p>"
echo "All files accessible in a Unix system are arranged in one
big tree, the file hierarchy, rooted at <b>/</b>. These files
can be spread out over several devices. The <b>mount</b> command
serves to attach the file system found on some device to
the big file tree. Conversely, the <b>umount(8)</b> command will
detach it again."
echo "<p>"
) | $OPIE_SH -t fsmounter -f &
SCREENCLEAN2=$!
sleep 1
}
cleanup() {
kill $SCREENCLEAN $SCREENCLEAN2
rm -f /tmp/qcop-msg-filesystem_mounter.sh
}
get_action() {
# ask what to do (start/stop/status)
#
$OPIE_SH -m -t "Select Action" \
@@ -79,48 +79,48 @@ kill $SCREENCLEAN2
select_mountpoint() {
# present service list and choose
#
MOUNTPOINT=` cat /etc/fstab | cut -f1 \
| cut -d " " -f1 \
| egrep -v "(tmpfs|proc|devpts|^#)" \
| $OPIE_SH -i -l \
-g -t "SELECT MOUNTPOINT" \
-L "select fs: " `
}
######################################################################
# main
about
select_mountpoint
beforemount
get_action
if [ "$MOUNTPOINT" = "" ]
then echo "ugly error...." | $OPIE_SH -f ; cleanup
fi
-( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/fsmounter.png>"
+( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/fsmounter.png>"
echo "<h3>Output of $ACTION $MOUNTPOINT :</h3>"
echo "<pre>"
$ACTION $MOUNTPOINT 2>&1
echo "</pre><p>"
echo "<h3>diskfree</h3> how much space is left ?<br>"
echo "<p><table>"
df -Ph \
| grep -v "Mounted on" \
| sed 's/ / /g' \
| sed 's/ / /g' \
| sed 's/ / /g' \
| sed 's/ / /g' \
| sed 's/ / /g' \
| sed 's/ / /g' \
| sed "s/ / /g" \
| cut -d " " -f4- \
| sed 's/ /<\/td><td>/g' \
| sed 's/$/<\/td><\/tr>/' \
| sed 's/^/<tr><td>/' ; echo "</table>" \
) | $OPIE_SH -f
cleanup
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 @@
#!/bin/sh
# hostlist.sh - a demonstration of opie-sh
#
# Copyright (C) 2002 gonz@directbox.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 20020524-1 - icon to hostlist
# 20020517-1 - added icon, changed name in launcher
#
-CFG=/opt/QtPalmtop/share/config/hostlist.cfg
+CFG=$OPIEDIR/share/config/hostlist.cfg
OPIE_SH=opie-sh
hostlist() {
-( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/hostlist.png>"
+( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/hostlist.png>"
echo "<h3>Hostlist</h3><br>"
HOSTLIST=`cat $CFG | grep -v '#'`
for HOST in $HOSTLIST
do
PT=` ping -c 1 $HOST | grep avg|cut -d " " -f4-`
if [ "$PT" != "" ]
then echo "<b><font color=#00ff00> "
echo "$HOST is up<br></font></b>[$PT]<br>"
else echo "<b><font color=#ff0000> "
echo "$HOST is down<br></font></b>[$PT]<br>"
fi
done
) | $OPIE_SH -t "Which are up ?" -f
}
cleanup() {
kill $SCREENCLEAN
rm -f /tmp/qcop-msg-hostlist.sh
}
about() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/hostlist.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/hostlist.png>"
echo "<h3>About</h3>"
echo "This little App should make it possible for you to "
echo "check some hosts for availability."
echo "<p>"
) | $OPIE_SH -t hostlist -f &
SCREENCLEAN=$!
sleep 1
}
#####################################################################
#
# main
about
# ask to: start or edit list
$OPIE_SH -m -g -t Hostlist -M "Welcome!" -0 Start -1 "Edit Hostlist"
RETURNCODE=$?
case $RETURNCODE in
-1) echo died unexpectedly... | $OPIE_SH -f
cleanup
exit ;;
1) textedit $CFG
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 @@
#!/bin/sh
# killproc.sh - a demonstration of opie-sh
#
# Copyright (C) 2002 gonz@directbox.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 20020524-1 - code optix
# 20020519-1 - added icon to output
# 20020517-1 - nicer fullscreen, added about, tried icon
-OPIE_SH=/opt/QtPalmtop/bin/opie-sh
+OPIE_SH=$OPIEDIR/bin/opie-sh
######################################################################
# subroutines
about() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/killproc.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/killproc.png>"
echo "<h3>About</h3>"
echo "This little util sends the TERM signal "
echo "to the specified process or process group. "
echo "The TERM signal will kill processes which "
echo "do not catch this signal. "
echo "<p> "
) | $OPIE_SH -t opie-killproc -f &
SCREENCLEAN=$!
sleep 1
}
cleanup() {
kill $SCREENCLEAN
rm -f /tmp/qcop-msg-killproc.sh
}
select_process() {
# present process list and choose
#
PROCESS=`ps -eaf | cut -b 10-15,40- \
| cut -b -40 \
| grep -v "TIME CMD" \
| $OPIE_SH -i -l -g \
-t "Select Process" `
}
######################################################################
# main
about
select_process
PROCESS=`echo $PROCESS | cut -b -4`
-( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/killproc.png>"
+( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/killproc.png>"
echo "<h3>Output of kill $PROCESS</h3>"
echo "<pre>"
kill $PROCESS 2>&1
echo "</pre><p>"
echo done.
) | $OPIE_SH -f
cleanup
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 @@
#!/bin/sh
# launcher_refresh.sh - a demonstration of opie-sh
#
# Copyright (C) 2002 gonz@directbox.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-OPIE_SH=opie-sh
+OPIE_SH=$OPIEDIR/bin/opie-sh
launcher_refresh() {
-( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/launcher_refresh.png>"
+( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/launcher_refresh.png>"
echo "<h3>Refresh successful!</h3><br>"
echo the launcher has been refreshed.
echo
echo this is useful if you installed packages using ipk instead of
echo oipkg. it is also helping if you are changing .desktop-files
echo often.
echo "<p>" it also refreshes the input-methods.
) | $OPIE_SH -t "launcher-refresh" -f
}
cleanup() {
rm -f /tmp/qcop-msg-launcher_refresh.sh
}
#####################################################################
#
# main
-/opt/QtPalmtop/bin/qcop QPE/TaskBar "reloadInputMethods()"
-#/opt/QtPalmtop/bin/qcop QPE/System "restart()"
-/opt/QtPalmtop/bin/qcop QPE/System "linkChanged(QString)"
+$OPIEDIR/bin/qcop QPE/TaskBar "reloadInputMethods()"
+#$OPIEDIR/bin/qcop QPE/System "restart()"
+$OPIEDIR/bin/qcop QPE/System "linkChanged(QString)"
launcher_refresh
cleanup
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 @@
#!/bin/sh
# logviewer.sh - a demonstration of opie-sh
#
# Copyright (C) 2002 gonz@directbox.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 20020526-1a - initial release...
#
-OPIE_SH=/opt/QtPalmtop/bin/opie-sh
+OPIE_SH=$OPIEDIR/bin/opie-sh
INITPATH=/etc/init.d
######################################################################
# subroutines
about() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/logviewer.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/logviewer.png>"
echo "<h3>About</h3>"
echo "This little App should make it possible for you to "
echo "easily have a look at some of the syslogs. "
echo "<p>"
) | $OPIE_SH -t logviewer -f &
SCREENCLEAN=$!
sleep 1
}
cleanup() {
kill $SCREENCLEAN 2>/dev/null
rm -f /tmp/qcop-msg-logviewer.sh
}
choose_log() {
# ask what to do (start/stop/status)
#
$OPIE_SH -m -t "Select Log" \
-M "which logfile are you interested in ?<br>" \
-g -0 "PROC" -1 "SYSLOG"
RETURNCODE=$?
case $RETURNCODE in
-1) echo unexpected input detected, exiting.
@@ -53,62 +53,62 @@ choose_log() {
0) LOGMETHOD=proc ;;
1) LOGMETHOD=syslog ;;
esac
}
######################################################################
# main
about
choose_log
case $LOGMETHOD in
proc) $OPIE_SH -m -t "Select Log" \
-M "which procfile ?<br>" \
-g -0 kmsg -1 "ksyms"
RETURNCODE=$?
case $RETURNCODE in
-1) cleanup ;;
0)
cat /proc/kmsg >/tmp/log.$$ &
PID=$!
sleep 2
kill $PID
-( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/logviewer.png>"
+( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/logviewer.png>"
echo "<h3>/proc/kmsg</h3>"
cat /tmp/log.$$
) | $OPIE_SH -t kmsg -f
rm -f /tmp/$$
cleanup ;;
1)
cat /proc/ksyms >/tmp/log.$$ &
PID=$!
sleep 2
kill $PID
-( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/logviewer.png>"
+( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/logviewer.png>"
echo "<h3>/proc/ksyms</h3>"
cat /tmp/log.$$
) | $OPIE_SH -t ksyms -f
rm -f /tmp/$$
cleanup ;;
*) cleanup ;;
esac
cleanup ;;
syslog)
if [ -f /var/log/messages ]
then
$OPIE_SH -t syslog -f /var/log/messages
else
echo "no syslogd installed or /var/log/messages inexistent." \
| $OPIE_SH -t syslog -f
fi
;;
*) cleanup ;;
esac
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 @@
#!/bin/sh
# opie-sh-ssh-askpass -- ssh-askpass utility using opie-sh
-OPIE_SH=opie-sh
+OPIE_SH=$OPIEDIR/bin/opie-sh
exec $OPIE_SH -i -p -t "OpenSSH" -g -L "<SMALL>$@" 2>/dev/null
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 @@
#!/bin/sh
# wavelanchooser.sh - a demonstration of opie-sh
#
# Copyright (C) 2002 gonz@directbox.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 20020528-1 - fixed filename in cleanup
# 20020526-1 - rudimental but working
# 20020524-1 - initial working release planned
#
-OPIE_SH=opie-sh
+OPIE_SH=$OPIEDIR/bin/opie-sh
about() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/qtwavelan.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/qtwavelan.png>"
echo "<h3>About</h3>"
echo "This little App is for changing the location setting"
echo "for your wireless card. <br>"
echo "actually it only starts /etc/init.d/[home|work] and can"
echo "be easily turned into a quick program to start the service"
echo "or init script you use most."
echo "<p>"
) | $OPIE_SH -t wavelanchooser -f &
SCREENCLEAN=$!
sleep 1
}
cleanup() {
kill $SCREENCLEAN $SCREENCLEAN2
rm -f /tmp/qcop-msg-opie-sh-wavelanchooser.sh
}
about
# choose if work or home
$OPIE_SH -m -t "network-settings dialog" \
-M "which configuration do you want ? " \
-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 @@
#!/bin/sh
# rsyncme.sh - a demonstration of opie-sh
#
# Copyright (C) 2002 gonz@directbox.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 20020517-1 - added icon, changed name in launcher
#
-CFG=/opt/QtPalmtop/share/config/rsyncme.cfg
-OPIE_SH=opie-sh
+CFG=$OPIEDIR/share/config/rsyncme.cfg
+OPIE_SH=$OPIEDIR/bin/opie-sh
update_cfg() {
# check if dir is in CFG and if not add it
if [ "`grep -c $DIR $CFG`" = "0" ]
then echo $DIR >>$CFG
fi
}
ask_dirs() {
# get source and destination dir
DIR=`$OPIE_SH -g -i -t "Choose Source Directory" -l -L DIR: -E -F $CFG `
update_cfg
SRCDIR=$DIR
DIR=`$OPIE_SH -g -i -t "Choose Destination Directory" -l -L DIR: -E -F $CFG `
update_cfg
DESTDIR=$DIR
}
ask_options() {
# now ask for options
OPTIONS="--archive --verbose --checksum --recursive --update --links --partial --dry-run --rsh=ssh --existing --compress --recursive"
OUTPUT=`( for OPTION in $OPTIONS
do
@@ -47,49 +47,49 @@ ask_options() {
done ) | $OPIE_SH -t "Select options" -g -i -b -F `
}
rsync_output() {
( echo "<h3>Output of your rsync:</h3>"
echo "command: rsync $OUTPUT $SRCDIR $DESTDIR"
echo "<pre>"
rsync $OUTPUT $SRCDIR $DESTDIR 2>&1
echo "</pre>done."
) | $OPIE_SH -t "Result:" -f
}
cleanup() {
kill $SCREENCLEAN
rm -f /tmp/qcop-msg-rsyncme.sh
}
show_dirs() {
( echo "<h3>Directorys chosen for sync:</h3>"
echo "<ul><li>$SRCDIR<li>$DESTDIR</ul>" ) \
| $OPIE_SH -t "Got directories" -f
}
about() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/rsyncme.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/rsyncme.png>"
echo "<h3>About</h3>"
echo "This little App should make it possible for you to "
echo "easily choose the wanted options for an rsync process."
echo "<p>"
) | $OPIE_SH -t rsync-helper -f &
SCREENCLEAN=$!
sleep 1
}
#####################################################################
#
# main
about
# ask to: start rsync, edit dirlist, show about
$OPIE_SH -m -g -t RsyncMe -M "Welcome!" -0 Start -1 Dirlist
RETURNCODE=$?
case $RETURNCODE in
-1) echo died unexpectedly... | $OPIE_SH -f
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 @@
#!/bin/sh
# service_manager.sh - a demonstration of opie-sh
#
# Copyright (C) 2002 gonz@directbox.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 20020524-1 - added icon to statusinfo...
# 20020518-1 - optix
# 20020517-1 - added about and fullscreen
#
-OPIE_SH=/opt/QtPalmtop/bin/opie-sh
+OPIE_SH=$OPIEDIR/bin/opie-sh
INITPATH=/etc/init.d
######################################################################
# subroutines
about() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/service_manager.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/service_manager.png>"
echo "<h3>About</h3>"
echo "This little App should make it possible for you to "
echo "easily start and stop services in /etc/init.d."
echo "<p>"
) | $OPIE_SH -t service-manager -f &
SCREENCLEAN=$!
sleep 1
}
cleanup() {
kill $SCREENCLEAN
rm -f /tmp/qcop-msg-service_manager.sh
}
get_action() {
# ask what to do (start/stop/status)
#
$OPIE_SH -m -t "Select Action" \
-M "which action do you want to do to $SERVICE ?<br>" \
-g -0 start -1 stop -2 status
RETURNCODE=$?
case $RETURNCODE in
-1) echo unexpected input detected, exiting.
exit ;;
0) ACTION=start ;;
1) ACTION=stop ;;
2) ACTION=status ;;
esac
}
status_disclaimer() {
# tell that init scripts are not too standard
#
cat | $OPIE_SH -f <<EOT
-<img src=/opt/QtPalmtop/pics/opie-sh-scripts/service_manager.png>
+<img src=$OPIEDIR/pics/opie-sh-scripts/service_manager.png>
<h3>status has been disabled</h3>
the status service has been disabled
because it is not supported by the
most init scripts that come with
familiar ...<p>
perhaps it will be replaced with
something more useful in the future...
EOT
}
select_service() {
# present service list and choose
#
cd $INITPATH/
SERVICE=` ls -1 | $OPIE_SH -i -l \
-g -t "Select Service" \
`
cd -
}
######################################################################
# 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 @@
#!/bin/sh
#stowctrl.sh - modified usbnetctrl.sh from gonz by spiralman spiralman@softhome.net
# usbnetctrl.sh - a demonstration of opie-sh
#
# Copyright (C) 2002 gonz@directbox.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 20020524-1 - code beautification, added icons and reset
# 20020517-2 - bugfixed fullscreen, added info about ifconfig
# 20020517-1 - added about, fullscreen and icon
-OPIE_SH=/opt/QtPalmtop/bin/opie-sh
+OPIE_SH=$OPIEDIR/bin/opie-sh
######################################################################
# subroutines
about() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/stowctrl.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/stowctrl.png>"
echo "<h3>About</h3>"
echo "This little App should make it easy for you to "
echo "activate / deactivate the stowaway keyboard (on ipaq)"
echo "<p>"
) | $OPIE_SH -t "stowaway control" -f &
SCREENCLEAN=$!
sleep 1
}
startup() {
- echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/stowctrl.png>" > /tmp/sout
+ echo "<img src=$OPIEDIR/pics/opie-sh-scripts/stowctrl.png>" > /tmp/sout
echo "<h3>stowaway up</h3>" >> /tmp/sout
modprobe h3600_stowaway >> /tmp/sout
cat /dev/stowaway &
echo $! > /tmp/stowcatpid
$OPIE_SH -t Output -f /tmp/sout
rm /tmp/sout
}
stopit() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/stowctrl.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/stowctrl.png>"
echo "<h3>stowaway down</h3>"
read THECAT < /tmp/stowcatpid
kill $THECAT
rmmod h3600_stowaway
) 2>&1 | $OPIE_SH -t Output -f
}
cleanup() {
kill $SCREENCLEAN
rm -f /tmp/qcop-msg-stowctrl.sh
}
yesorno() {
$OPIE_SH -m -t "Stowaway Up/Down" -M "What to do with the Stowaway: " \
-g -0 Up -1 Down -2 Restart
RETURNCODE=$?
case $RETURNCODE in
-1) echo error...
cleanup
exit ;;
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 @@
#!/bin/sh
# usbnetctrl.sh - a demonstration of opie-sh
#
# Copyright (C) 2002 gonz@directbox.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 20020524-1 - code beautification, added icons and reset
# 20020517-2 - bugfixed fullscreen, added info about ifconfig
# 20020517-1 - added about, fullscreen and icon
-OPIE_SH=/opt/QtPalmtop/bin/opie-sh
+OPIE_SH=$OPIEDIR/bin/opie-sh
######################################################################
# subroutines
about() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/usbnetctrl.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/usbnetctrl.png>"
echo "<h3>About</h3>"
echo "This little App should make it easy for you to "
echo "activate / deactivate the usbnet-driver (on ipaq)"
echo "<p>"
echo "To use it at first, you need to change the ifconfig"
- echo "line in /opt/QtPalmtop/bin/usbnetctrl.sh."
+ echo "line in $OPIEDIR/bin/usbnetctrl.sh."
) | $OPIE_SH -t "usbnet control" -f &
SCREENCLEAN=$!
sleep 1
}
startup() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/usbnetctrl.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/usbnetctrl.png>"
echo "<h3>usbnet up</h3>"
modprobe usb-eth
) 2>&1 | $OPIE_SH -t Output -f
$OPIE_SH -m -I -t "Usbnet Control" -M "Please connect the<br>ipaq to the cradle<br>and press OK"
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/usbnetctrl.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/usbnetctrl.png>"
echo "<h3>usbnet up</h3>"
ifconfig usbf up 192.168.0.1 netmask 255.255.255.0
) 2>&1 | $OPIE_SH -t Output -f
if [ -f /root/masq.sh ]
then sh /root/masq.sh
fi
}
stopit() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/usbnetctrl.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/usbnetctrl.png>"
echo "<h3>usbnet down</h3>"
ifconfig usbf down
sleep 1
rmmod usb-eth
rmmod sa1100usb_core
) 2>&1 | $OPIE_SH -t Output -f
}
cleanup() {
kill $SCREENCLEAN
rm -f /tmp/qcop-msg-usbnetctrl.sh
}
yesorno() {
$OPIE_SH -m -t "USB-Net start/stop" -M "What to do with usbnet: " \
-g -0 Start -1 Stop -2 Restart
RETURNCODE=$?
case $RETURNCODE in
-1) echo error...
cleanup
exit ;;