1 |
pva 11/04/03 17:55:17 |
2 |
|
3 |
Modified: autofs5.initd |
4 |
Log: |
5 |
Use proper if-logic in autofs.initd, bug #361787, thank Piotr Mitas for report Dustin Polke for fix |
6 |
|
7 |
(Portage version: 2.1.9.45/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 net-fs/autofs/files/autofs5.initd |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs5.initd?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs5.initd?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs5.initd?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: autofs5.initd |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-fs/autofs/files/autofs5.initd,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -u -r1.1 -r1.2 |
22 |
--- autofs5.initd 3 Apr 2011 09:49:15 -0000 1.1 |
23 |
+++ autofs5.initd 3 Apr 2011 17:55:17 -0000 1.2 |
24 |
@@ -1,7 +1,7 @@ |
25 |
#!/sbin/runscript |
26 |
# Copyright 1999-2011 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/files/autofs5.initd,v 1.1 2011/04/03 09:49:15 pva Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/files/autofs5.initd,v 1.2 2011/04/03 17:55:17 pva Exp $ |
30 |
|
31 |
DAEMON=/usr/sbin/automount |
32 |
PIDFILE=/var/run/autofs.pid |
33 |
@@ -29,18 +29,20 @@ |
34 |
sleep 1 |
35 |
if [ -e "/proc/misc" ]; then |
36 |
MINOR=$(awk "/${DEVICE}/ {print \$1}" /proc/misc) |
37 |
- [ -n "${MINOR}" -a ! -c "/dev/${DEVICE}" ] && \ |
38 |
+ if [ -n "${MINOR}" -a ! -c "/dev/${DEVICE}" ]; then |
39 |
mknod -m 0600 "/dev/${DEVICE}" c 10 ${MINOR} |
40 |
- if [ $? -ne 0 ]; then |
41 |
- eend 1 "Could not create '/dev/${DEVICE}'" |
42 |
- return 1 |
43 |
+ if [ $? -ne 0 ]; then |
44 |
+ eend 1 "Could not create '/dev/${DEVICE}'" |
45 |
+ return 1 |
46 |
+ fi |
47 |
fi |
48 |
fi |
49 |
- [ -x /sbin/restorecon -a -c "/dev/${DEVICE}" ] && \ |
50 |
+ if [ -x /sbin/restorecon -a -c "/dev/${DEVICE}" ]; then |
51 |
/sbin/restorecon "/dev/${DEVICE}" |
52 |
- if [ $? -ne 0 ]; then |
53 |
- eend 1 "Failed to execute '/sbin/restorecon \"/dev/${DEVICE}\"'" |
54 |
- return 1 |
55 |
+ if [ $? -ne 0 ]; then |
56 |
+ eend 1 "Failed to execute '/sbin/restorecon \"/dev/${DEVICE}\"'" |
57 |
+ return 1 |
58 |
+ fi |
59 |
fi |
60 |
else |
61 |
[ -c "/dev/${DEVICE}" ] && rm -rf "/dev/${DEVICE}" |