Author: branden Date: 2003-08-19 19:36:10 -0500 (Tue, 19 Aug 2003) New Revision: 406
Modified: trunk/debian/xserver-xfree86.postinst.in Log: debian/xserver-xfree86.postinst.in: fix another combination syntax/logic error; close open if block and react gracefully if for some loony reason the user has made the X server symlink point to a directory Modified: trunk/debian/xserver-xfree86.postinst.in =================================================================== --- trunk/debian/xserver-xfree86.postinst.in 2003-08-19 19:48:34 UTC (rev 405) +++ trunk/debian/xserver-xfree86.postinst.in 2003-08-20 00:36:10 UTC (rev 406) @@ -58,10 +58,16 @@ NEW_SERVER_SYMLINK="$SERVER_SYMLINK.dpkg-new" ln -sf "$THIS_SERVER" "$NEW_SERVER_SYMLINK" if ! cmp -s "$SERVER_SYMLINK" "$NEW_SERVER_SYMLINK"; then - if [ "$(readlink "$SERVER_SYMLINK")" \ - != "$(readlink "$NEW_SERVER_SYMLINK")" ]; then - mv "$NEW_SERVER_SYMLINK" "$SERVER_SYMLINK" - readlink "$SERVER_SYMLINK" | m5sum > "$SERVER_SYMLINK_CHECKSUM" + if [ "$(readlink "$SERVER_SYMLINK")" \ + != "$(readlink "$NEW_SERVER_SYMLINK")" ]; then + if [ ! -d "$SERVER_SYMLINK" ]; then + mv "$NEW_SERVER_SYMLINK" "$SERVER_SYMLINK" + readlink "$SERVER_SYMLINK" | m5sum > "$SERVER_SYMLINK_CHECKSUM" + else + message "Note: not updating $SERVER_SYMLINK; it is a symbolic" \ + "link to a directory" + fi + fi fi rm -f "$NEW_SERVER_SYMLINK" fi