Skip to content

Commit

Permalink
use which instead of type to check for the existense of ucr
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Dec 18, 2015
1 parent ccd5008 commit 8bf173e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion debian/bareos-director.postinst.in
Expand Up @@ -45,7 +45,7 @@ case "$1" in
fi
permissions
# on Univention distributions the ucr command allows to open the firewall
if [ -x "/etc/init.d/univention-firewall" ] && type ucr >/dev/null 2>&1; then
if [ -x "/etc/init.d/univention-firewall" ] && which ucr >/dev/null 2>&1; then
ucr set \
security/packetfilter/package/bareos-director/tcp/@dir_port@/all="ACCEPT" \
security/packetfilter/package/bareos-director/tcp/@dir_port@/all/en="bareos-dir"
Expand Down
2 changes: 1 addition & 1 deletion debian/bareos-filedaemon.postinst.in
Expand Up @@ -47,7 +47,7 @@ case "$1" in
fi
permissions
# on Univention distributions the ucr command allows to open the firewall
if [ -x "/etc/init.d/univention-firewall" ] && type ucr >/dev/null 2>&1; then
if [ -x "/etc/init.d/univention-firewall" ] && which ucr >/dev/null 2>&1; then
ucr set \
security/packetfilter/package/bareos-filedaemon/tcp/@fd_port@/all="ACCEPT" \
security/packetfilter/package/bareos-filedaemon/tcp/@fd_port@/all/en="bareos-fd"
Expand Down
2 changes: 1 addition & 1 deletion debian/bareos-storage.postinst.in
Expand Up @@ -50,7 +50,7 @@ case "$1" in
permissions
/usr/lib/bareos/scripts/bareos-config setup_sd_user
# on Univention distributions the ucr command allows to open the firewall
if [ -x "/etc/init.d/univention-firewall" ] && type ucr >/dev/null 2>&1; then
if [ -x "/etc/init.d/univention-firewall" ] && which ucr >/dev/null 2>&1; then
ucr set \
security/packetfilter/package/bareos-storage/tcp/@sd_port@/all="ACCEPT" \
security/packetfilter/package/bareos-storage/tcp/@sd_port@/all/en="bareos-sd"
Expand Down

0 comments on commit 8bf173e

Please sign in to comment.