Gentoo Archives: gentoo-user

From: Christoph Gysin <cgysin@×××.ch>
To: gentoo-user@l.g.o
Cc: bshlists@××××××.com
Subject: Re: [gentoo-user] what is wrong with script
Date: Tue, 30 Aug 2005 15:08:11
Message-Id: 43147331.1090800@gmx.ch
In Reply to: [gentoo-user] what is wrong with script by bshlists
1 bshlists wrote:
2 > I've been trying run this script on my gentoo laptop, but for some reason it
3 > does not work. If you see what is wrong could you email me. Thanks.
4 >
5 > #!/bin/bash
6 >
7 > if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
8 > then
9 > rmmod garmin_gps
10 > chmod 666 $DEVICE
11 > fi
12 >
13
14 $ man test
15
16 -f FILE
17 FILE exists and is a regular file
18
19
20 I don't know the garmin_gps module and its devices, but I assume $DEVICE is a
21 character device. So the test should be:
22
23 ... && [ -c "${DEVICE}" ]
24
25 Christoph
26 --
27 echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org@fr33z3
28 --
29 gentoo-user@g.o mailing list