-rw-r--r-- | share/opie-login/pre-session | 31 |
1 files changed, 8 insertions, 23 deletions
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 | |||
@@ -18,39 +18,24 @@ USER=$1 | |||
18 | permin () | 18 | 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 | ||