summaryrefslogtreecommitdiff
path: root/pcr/openresolv-openrc/openrc-path.patch
blob: dd550623a63e44300f214317a02fa6a61c8a4310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- openresolv-3.6.1/configure	2015-01-11 13:53:25.286463178 +0530
+++ openresolv-3.6.1/configure-openrc	2015-01-11 13:52:42.716464000 +0530
@@ -159,7 +159,11 @@
 
 if [ -z "$RESTARTCMD" ]; then
 	printf "Checking for OpenRC ... "
-	if [ -x /sbin/rc-service ]; then
+	# For Arch /sbin -> /usr/bin
+	if [ -x /usr/bin/rc-service ]; then
+		RESTARTCMD="if /usr/bin/rc-service -e \1; then /usr/bin/rc-service \1 -- -Ds restart; fi"
+		echo "yes"
+	elif [ -x /sbin/rc-service ]; then
 		RESTARTCMD="if /sbin/rc-service -e \1; then /sbin/rc-service \1 -- -Ds restart; fi"
 		echo "yes"
 	else
@@ -178,7 +182,12 @@
 fi
 if [ -z "$RESTARTCMD" ]; then
 	printf "Checking for service ... "
-	if [ -x /sbin/service ]; then
+	# For Arch /sbin -> /usr/bin
+	if [ -x /usr/bin/service ]; then
+		RCDIR=/etc/init.d
+		RESTARTCMD="if /usr/bin/service \1; then /usr/bin/service \1 restart; fi"
+		echo "yes"
+	elif [ -x /sbin/service ]; then
 		RCDIR=/etc/init.d
 		RESTARTCMD="if /sbin/service \1; then /sbin/service \1 restart; fi"
 		echo "yes"