tag 604221 + patch
thanks

On Sun, 21 Nov 2010 10:51:46 +0100, Lucas Nussbaum wrote:

> > awk: cmd. line:1: fatal: cannot open file `/etc/mtab' for reading (No such 
> > file or directory)
> > dpkg: error processing hylafax-server (--configure):
> > subprocess installed post-installation script returned error exit status 2
> > configured to not write apport reports
> > Errors were encountered while processing:
> > hylafax-server

debdiff with a proposed fix attached.

Cheers,
gregor
 
-- 
 .''`.   http://info.comodo.priv.at/ -- GPG key IDs: 0x8649AA06, 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
   `-    BOFH excuse #168:  le0: no carrier: transceiver cable problem? 
diff -Nru hylafax-6.0.5/debian/changelog hylafax-6.0.5/debian/changelog
--- hylafax-6.0.5/debian/changelog	2010-10-12 12:19:13.000000000 +0200
+++ hylafax-6.0.5/debian/changelog	2010-11-28 13:27:31.000000000 +0100
@@ -1,3 +1,15 @@
+hylafax (2:6.0.5-4.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "installation fails": use /proc/mounts instead of /etc/mtab which
+    might or might not be available and might or might not contain what is
+    expected (closes: #604221).
+    The bug affects only hylafax-server.postins directly but changing it in
+    hylafax-server.hylafax.init and copy_configuration_from_spool seems
+    appropriate for consistence.
+
+ -- gregor herrmann <[email protected]>  Sun, 28 Nov 2010 13:25:16 +0100
+
 hylafax (2:6.0.5-4) unstable; urgency=low
 
   * Added two packages with debug information.
diff -Nru hylafax-6.0.5/debian/copy_configuration_from_spool hylafax-6.0.5/debian/copy_configuration_from_spool
--- hylafax-6.0.5/debian/copy_configuration_from_spool	2010-06-20 00:29:50.000000000 +0200
+++ hylafax-6.0.5/debian/copy_configuration_from_spool	2010-11-28 13:38:25.000000000 +0100
@@ -33,7 +33,7 @@
 	exit 1
 fi
 
-if [ "$(grep -c ^$SPOOL/etc\  /etc/mtab)" -ne 0 ]
+if [ "$(grep -c ^$SPOOL/etc\  /proc/mounts)" -ne 0 ]
 then
 	# nothing to be done since directory are the same, mounted with bind option
 	exit 0
diff -Nru hylafax-6.0.5/debian/hylafax-server.hylafax.init hylafax-6.0.5/debian/hylafax-server.hylafax.init
--- hylafax-6.0.5/debian/hylafax-server.hylafax.init	2010-09-23 09:49:39.000000000 +0200
+++ hylafax-6.0.5/debian/hylafax-server.hylafax.init	2010-11-28 13:38:25.000000000 +0100
@@ -160,7 +160,7 @@
 # like hurd and *bsd
 umountbind()
 {
-	awk -v mp="$1" '$1=="/etc/hylafax" && $2==mp { system("umount "$2)}' /etc/mtab
+	awk -v mp="$1" '$1=="/etc/hylafax" && $2==mp { system("umount "$2)}' /proc/mounts
 }
 
 # This function may be used for debugging: it prints a command
diff -Nru hylafax-6.0.5/debian/hylafax-server.postinst hylafax-6.0.5/debian/hylafax-server.postinst
--- hylafax-6.0.5/debian/hylafax-server.postinst	2010-06-20 00:29:50.000000000 +0200
+++ hylafax-6.0.5/debian/hylafax-server.postinst	2010-11-28 13:38:25.000000000 +0100
@@ -226,7 +226,7 @@
 	# workaround for upgrading from 6.0.3 since the init script did not umount
 	# correctly the file system. See #551566 and #551443.
 	# The source problem is in mountpoint command. See #359717
-	awk '$1=="/etc/hylafax" && $2=="/var/spool/hylafax/etc" { system("umount "$2)}' /etc/mtab
+	awk '$1=="/etc/hylafax" && $2=="/var/spool/hylafax/etc" { system("umount "$2)}' /proc/mounts
 
 	(echo; echo no; echo no) | faxsetup -server
 #	[ $restart = true ] && invoke-rc.d hylafax start

Attachment: signature.asc
Description: Digital signature

Reply via email to