author | kergoth <kergoth> | 2003-01-28 19:41:03 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-01-28 19:41:03 (UTC) |
commit | c73371101f28e1c28837b35c62fde18f16dfb32f (patch) (unidiff) | |
tree | db55da47d73692283df2b657963d8b8c85195c37 /share | |
parent | 7cf931b1571a65212f6b085e3c04087f03430d40 (diff) | |
download | opie-c73371101f28e1c28837b35c62fde18f16dfb32f.zip opie-c73371101f28e1c28837b35c62fde18f16dfb32f.tar.gz opie-c73371101f28e1c28837b35c62fde18f16dfb32f.tar.bz2 |
Script cleanup
-rw-r--r-- | share/opie-login/post-session | 25 | ||||
-rw-r--r-- | share/opie-login/pre-session | 31 |
2 files changed, 27 insertions, 29 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 | ||
3 | if [ -e /proc/hal/model ]; then | 3 | permin () |
4 | [ -e /dev/sound/dsp ] && chown root /dev/sound/dsp | 4 | { |
5 | [ -e /dev/sound/mixer ] && chown root /dev/sound/mixer | 5 | if [ -e $1 ] |
6 | [ -e /dev/touchscreen/0 ] && chown root /dev/touchscreen/0 | 6 | then |
7 | [ -e /dev/fb/0 ] && chown root /dev/fb/0 | 7 | chown root $1 |
8 | [ -e /dev/vc/0 ] && chown root /dev/vc/0 | 8 | else |
9 | echo Warning: $1 does not exist. | ||
10 | return 1 | ||
9 | fi | 11 | fi |
12 | } | ||
10 | 13 | ||
14 | if [ -e /proc/hal/model ]; then | ||
15 | devs = /dev/sound/dsp /dev/sound/mixer /dev/touchscreen/0 \ | ||
16 | /dev/fb/0 /dev/vc/0 | ||
17 | else | ||
18 | devs = /dev/dsp /dev/dsp1 /dev/mixer /dev/ts /dev/fb0 \ | ||
19 | /dev/sharp* /dev/collie* | ||
20 | fi | ||
11 | 21 | ||
22 | for i in $devs; do | ||
23 | permout( $i ) | ||
24 | done | ||
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 | |||
23 | chown $USER $1 | 22 | 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 | ||
31 | permout () | ||
32 | { | ||
33 | [ -e $1 ]&& chown root $1 | ||
34 | [ -e $1 ]&& chmod g+rw $1 | ||
35 | } | ||
36 | |||
37 | if [ -e /proc/hal/model ]; then | 29 | if [ -e /proc/hal/model ]; then |
38 | |||
39 | # fix for misconfigured devfsd | 30 | # fix for misconfigured devfsd |
40 | chmod +x /dev/sound /dev/touchscreen /dev/fb /dev/vc | 31 | chmod +x /dev/sound /dev/touchscreen /dev/fb /dev/vc |
41 | 32 | devs = /dev/sound/dsp /dev/sound/mixer /dev/touchscreen/0 \ | |
42 | [ -e /dev/sound/dsp ] && chown $USER /dev/sound/dsp | 33 | /dev/fb/0 /dev/vc/0 |
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 | |||
48 | else | 34 | else |
35 | devs = /dev/dsp /dev/dsp1 /dev/mixer /dev/ts /dev/fb0 \ | ||
36 | /dev/sharp* /dev/collie* | ||
37 | fi | ||
49 | 38 | ||
50 | for dev in /dev/dsp /dev/dsp1 /dev/mixer \ | 39 | for i in $devs; do |
51 | /dev/ts /dev/fb0 | 40 | permin( $i ) |
52 | do | ||
53 | permin( $dev ) | ||
54 | done | 41 | done |
55 | |||
56 | fi | ||