[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#260136: grub-installer: fails in postinst (missing get_serial_console)



On Sun, Jul 18, 2004 at 08:52:16PM +0200, Steinar H. Gunderson wrote:
> Package: grub-installer
> Severity: grave
> Justification: renders package unusable
> 
> grub-installer fails to install, with the following message in syslog:
> 
> Jul 18 20:45:52 main-menu[298]: (process:25772): /var/lib/dpkg/info/grub-installer.postinst: 7: get_serial_console: not found
> 
> get_serial_console() is a function defined further down in the script,
> which appearently can't be run in a subshell in ash like line 7 tries to
> do:
> 
> serial="$(get_serial_console)"

I am not sure if this could have ever worked.
The attached patch should resolve the problem by 
calling get_serial_console after it is defined.

-- 
Horms
Index: debian/postinst
===================================================================
--- debian/postinst	(revision 17414)
+++ debian/postinst	(working copy)
@@ -4,8 +4,6 @@
 . /usr/share/debconf/confmodule
 #set -x
 
-serial="$(get_serial_console)"
-
 newline="
 "
 
@@ -35,6 +33,8 @@
   fi
 }
 
+serial="$(get_serial_console)"
+
 # This is copied from update-grub. We've requested that it be moved
 # to a utility or shell library.
 device_map=/target/boot/grub/device.map
@@ -323,10 +323,10 @@
 
 if ! is_floppy "$bootdev"; then
 	if chroot /target /sbin/grub-install -h 2>&1 | grep -q no-floppy; then
-		info "grub-install support --no-floppy"
+		info "grub-install supports --no-floppy"
 		floppyparam="--no-floppy"
 	else
-		info "grub-install do not support --no-floppy"
+		info "grub-install does not support --no-floppy"
 	fi
 fi

Reply to: