* Fix sgi-cgi postinst
authorSteven Barth <steven@midlink.org>
Sun, 15 Jun 2008 20:10:20 +0000 (20:10 +0000)
committerSteven Barth <steven@midlink.org>
Sun, 15 Jun 2008 20:10:20 +0000 (20:10 +0000)
libs/sgi-cgi/ipkg/postinst

index bbc1e53..d8780c2 100755 (executable)
@@ -1,11 +1,10 @@
 #!/bin/sh
 #!/bin/sh
-[ -f "${IPKG_INSTROOT}/etc/httpd.conf" ] && { 
-       PATTERNS='/cgi-bin/luci/admin:root:$p$root'
+PATTERNS='/cgi-bin/luci/admin:root:$p$root'
 
 
-       for i in $PATTERNS
-       do
-               grep "$i" ${IPKG_INSTROOT}/etc/httpd.conf >/dev/null 2>/dev/null || echo "$i" >> ${IPKG_INSTROOT}/etc/httpd.conf
-       done 
+for i in $PATTERNS
+do
+       grep "$i" ${IPKG_INSTROOT}/etc/httpd.conf >/dev/null 2>/dev/null || echo "$i" >> ${IPKG_INSTROOT}/etc/httpd.conf
+done 
+
+[ -n "${IPKG_INSTROOT}" ] || /etc/init.d/httpd restart
 
 
-       [ -n "${IPKG_INSTROOT}" ] || /etc/init.d/httpd restart
-}