From: Steven Barth Date: Sun, 15 Jun 2008 20:10:20 +0000 (+0000) Subject: * Fix sgi-cgi postinst X-Git-Tag: 0.8.0~803 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8d2f6c7041ac47f1ea615053d2f693f79f42c1ae;p=oweals%2Fluci.git * Fix sgi-cgi postinst --- diff --git a/libs/sgi-cgi/ipkg/postinst b/libs/sgi-cgi/ipkg/postinst index bbc1e5381..d8780c2e7 100755 --- a/libs/sgi-cgi/ipkg/postinst +++ b/libs/sgi-cgi/ipkg/postinst @@ -1,11 +1,10 @@ #!/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 -}