diff --git a/xCAT-probe/debian/postinst b/xCAT-probe/debian/postinst index 5ced18096..19af47964 100644 --- a/xCAT-probe/debian/postinst +++ b/xCAT-probe/debian/postinst @@ -20,6 +20,12 @@ set -e case "$1" in configure) + probe_lib=/opt/xcat/probe/lib/perl/xCAT + if [ -d "$probe_lib" ] && [ ! -L "$probe_lib" ] && + [ "$(stat -c %a "$probe_lib")" = 644 ] && + ! dpkg-statoverride --list "$probe_lib" >/dev/null; then + chmod 755 "$probe_lib" + fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/xCAT-probe/debian/rules b/xCAT-probe/debian/rules index bb1842ebe..7f1a3c4ba 100755 --- a/xCAT-probe/debian/rules +++ b/xCAT-probe/debian/rules @@ -42,8 +42,8 @@ binary-arch: dh_install -X".svn" chmod 755 `pwd`/debian/xcat-probe/opt/xcat/bin/* chmod 755 `pwd`/debian/xcat-probe/opt/xcat/probe/subcmds/* - chmod 644 `pwd`/debian/xcat-probe/opt/xcat/probe/lib/perl/* - chmod 644 `pwd`/debian/xcat-probe/opt/xcat/probe/lib/perl/xCAT/* + find `pwd`/debian/xcat-probe/opt/xcat/probe/lib -type d -exec chmod 755 {} + + find `pwd`/debian/xcat-probe/opt/xcat/probe/lib -type f -exec chmod 644 {} + # dh_installmenu # dh_installdebconf # dh_installlogrotate