Author: branden Date: 2003-08-19 13:46:35 -0500 (Tue, 19 Aug 2003) New Revision: 402
Modified: trunk/debian/xserver-xfree86.config.in trunk/debian/xserver-xfree86.preinst.in Log: Fix syntax and logic errors uncaught from revision 396. debian/xserver-xfree86.config.in: - debug_report_status() should call debug_echo(), not message() (lest we scare the user with harmless messages) - fix missing line-continuation bug debian/xserver-xfree86.preinst.in: fix syntax/logic error; close if statements checking for existence of configuration files Modified: trunk/debian/xserver-xfree86.config.in =================================================================== --- trunk/debian/xserver-xfree86.config.in 2003-08-19 09:31:59 UTC (rev 401) +++ trunk/debian/xserver-xfree86.config.in 2003-08-19 18:46:35 UTC (rev 402) @@ -39,7 +39,7 @@ debug_report_status () { # Syntax: debug_report_status command exit_status - message "$1 exited with status $2" + debug_echo "$1 exited with status $2" } discover_video () { @@ -434,7 +434,7 @@ # default") PRIORITY_CEILING= if [ -e "$XF86CONFIG" ]; then - debug_echo "$XF86CONFIG file exists; capping configuration question" + debug_echo "$XF86CONFIG file exists; capping configuration question" \ "priority at medium." PRIORITY_CEILING=medium fi Modified: trunk/debian/xserver-xfree86.preinst.in =================================================================== --- trunk/debian/xserver-xfree86.preinst.in 2003-08-19 09:31:59 UTC (rev 401) +++ trunk/debian/xserver-xfree86.preinst.in 2003-08-19 18:46:35 UTC (rev 402) @@ -40,46 +40,49 @@ # first, migrate the X server symlink if [ -e "$SERVER_SYMLINK" ]; then - # attempt to pre-seed the md5sum file based on the current content of - # the file - db_get shared/clobber_x-server_symlink - if [ "$RET" = "true" ]; then - # if the config file doesn't even exist, don't bother - if [ -e "$SERVER_SYMLINK" ]; then - # people were letting debconf "manage" the config file even - # though they complained when it did so, so store a backup to - # keep people quiet - message "Note: migrating $SERVER_SYMLINK away from management" \ - "by debconf; backup stored in $SERVER_SYMLINK.dpkg-old" \ - "and MD5 checksum stored in $SERVER_SYMLINK_CHECKSUM" - readlink "$SERVER_SYMLINK" | md5sum > "$SERVER_SYMLINK_CHECKSUM" - ln -s "$(readlink "$SERVER_SYMLINK")" "$SERVER_SYMLINK.dpkg-old" + # attempt to pre-seed the md5sum file based on the current content + # of the file + db_get shared/clobber_x-server_symlink + if [ "$RET" = "true" ]; then + # if the config file doesn't even exist, don't bother + if [ -e "$SERVER_SYMLINK" ]; then + # people were letting debconf "manage" the config file even + # though they complained when it did so, so store a backup to + # keep people quiet + message "Note: migrating $SERVER_SYMLINK away from management" \ + "by debconf; backup stored in" \ + "$SERVER_SYMLINK.dpkg-old and MD5 checksum stored in" \ + "$SERVER_SYMLINK_CHECKSUM" + readlink "$SERVER_SYMLINK" | md5sum > "$SERVER_SYMLINK_CHECKSUM" + ln -s "$(readlink "$SERVER_SYMLINK")" "$SERVER_SYMLINK.dpkg-old" + fi + else + message "Note: not storing MD5 checksum of $SERVER_SYMLINK;" \ + "file not under management of debconf." fi - else - message "Note: not storing MD5 checksum of $SERVER_SYMLINK; file" \ - "not under management of debconf." fi # next, migrate XF86Config-4 if [ -e "$XF86CONFIG" ]; then - # attempt to pre-seed the md5sum file based on the current content of - # the file - db_get xserver-xfree86/manage_config_with_debconf - if [ "$RET" = "true" ]; then - # if the config file doesn't even exist, don't bother - if [ -e "$XF86CONFIG" ]; then - # people were letting debconf "manage" the config file even though - # they complained when it did so, so store a backup to keep people - # quiet - message "Note: migrating $XF86CONFIG away from management by" \ - "debconf; backup stored in $XF86CONFIG.dpkg-old and MD5" \ - "checksum stored in $XF86CONFIG_CHECKSUM" - md5sum "$XF86CONFIG" > "$XF86CONFIG_CHECKSUM" - cp "$XF86CONFIG" "$XF86CONFIG.dpkg-old" + # attempt to pre-seed the md5sum file based on the current content + # of the file + db_get xserver-xfree86/manage_config_with_debconf + if [ "$RET" = "true" ]; then + # if the config file doesn't even exist, don't bother + if [ -e "$XF86CONFIG" ]; then + # people were letting debconf "manage" the config file even + # though they complained when it did so, so store a backup to + # keep people quiet + message "Note: migrating $XF86CONFIG away from management by" \ + "debconf; backup stored in $XF86CONFIG.dpkg-old and" \ + "MD5 checksum stored in $XF86CONFIG_CHECKSUM" + md5sum "$XF86CONFIG" > "$XF86CONFIG_CHECKSUM" + cp "$XF86CONFIG" "$XF86CONFIG.dpkg-old" + fi + else + message "Note: not storing MD5 checksum of $XF86CONFIG; file" \ + "not under management of debconf." fi - else - message "Note: not storing MD5 checksum of $XF86CONFIG; file not" \ - "under management of debconf." fi else -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]