summaryrefslogtreecommitdiff
path: root/share
authorkergoth <kergoth>2003-01-28 19:41:03 (UTC)
committer kergoth <kergoth>2003-01-28 19:41:03 (UTC)
commitc73371101f28e1c28837b35c62fde18f16dfb32f (patch) (unidiff)
treedb55da47d73692283df2b657963d8b8c85195c37 /share
parent7cf931b1571a65212f6b085e3c04087f03430d40 (diff)
downloadopie-c73371101f28e1c28837b35c62fde18f16dfb32f.zip
opie-c73371101f28e1c28837b35c62fde18f16dfb32f.tar.gz
opie-c73371101f28e1c28837b35c62fde18f16dfb32f.tar.bz2
Script cleanup
Diffstat (limited to 'share') (more/less context) (ignore whitespace changes)
-rw-r--r--share/opie-login/post-session25
-rw-r--r--share/opie-login/pre-session39
2 files changed, 31 insertions, 33 deletions
diff --git a/share/opie-login/post-session b/share/opie-login/post-session
index cc0030e..7016743 100644
--- a/share/opie-login/post-session
+++ b/share/opie-login/post-session
@@ -1,11 +1,24 @@
1#!/bin/sh 1#!/bin/sh
2 2
3permin ()
4{
5 if [ -e $1 ]
6 then
7 chown root $1
8 else
9 echo Warning: $1 does not exist.
10 return 1
11 fi
12}
13
3if [ -e /proc/hal/model ]; then 14if [ -e /proc/hal/model ]; then
4 [ -e /dev/sound/dsp ] && chown root /dev/sound/dsp 15 devs = /dev/sound/dsp /dev/sound/mixer /dev/touchscreen/0 \
5 [ -e /dev/sound/mixer ] && chown root /dev/sound/mixer 16 /dev/fb/0 /dev/vc/0
6 [ -e /dev/touchscreen/0 ] && chown root /dev/touchscreen/0 17else
7 [ -e /dev/fb/0 ] && chown root /dev/fb/0 18 devs = /dev/dsp /dev/dsp1 /dev/mixer /dev/ts /dev/fb0 \
8 [ -e /dev/vc/0 ] && chown root /dev/vc/0 19 /dev/sharp* /dev/collie*
9fi 20fi
10
11 21
22for i in $devs; do
23 permout( $i )
24done
diff --git a/share/opie-login/pre-session b/share/opie-login/pre-session
index 6bf9e4c..e147afc 100644
--- a/share/opie-login/pre-session
+++ b/share/opie-login/pre-session
@@ -19,38 +19,23 @@ permin ()
19{ 19{
20 if [ -e $1 ] 20 if [ -e $1 ]
21 then 21 then
22 22 chown $USER $1
23 chown $USER $1
24 chmod g-rw $1
25
26 else 23 else
24 echo Warning: $1 does not exist.
27 return 1 25 return 1
28 fi 26 fi
29} 27}
30 28
31permout ()
32{
33 [ -e $1 ]&& chown root $1
34 [ -e $1 ]&& chmod g+rw $1
35}
36
37if [ -e /proc/hal/model ]; then 29if [ -e /proc/hal/model ]; then
38 30 # fix for misconfigured devfsd
39 # fix for misconfigured devfsd 31 chmod +x /dev/sound /dev/touchscreen /dev/fb /dev/vc
40 chmod +x /dev/sound /dev/touchscreen /dev/fb /dev/vc 32 devs = /dev/sound/dsp /dev/sound/mixer /dev/touchscreen/0 \
41 33 /dev/fb/0 /dev/vc/0
42 [ -e /dev/sound/dsp ] && chown $USER /dev/sound/dsp
43 [ -e /dev/sound/mixer ] && chown $USER /dev/sound/mixer
44 [ -e /dev/touchscreen/0 ] && chown $USER /dev/touchscreen/0
45 [ -e /dev/fb/0 ] && chown $USER /dev/fb/0
46 [ -e /dev/vc/0 ] && chown $USER /dev/vc/0
47
48else 34else
49 35 devs = /dev/dsp /dev/dsp1 /dev/mixer /dev/ts /dev/fb0 \
50 for dev in /dev/dsp /dev/dsp1 /dev/mixer \ 36 /dev/sharp* /dev/collie*
51 /dev/ts /dev/fb0
52 do
53 permin( $dev )
54 done
55
56fi 37fi
38
39for i in $devs; do
40 permin( $i )
41done