Bug#385508: update-grub not called on postrm_hook without the full path

Jean-Luc Coulon (f5ibh) jean-luc.coulon at wanadoo.fr
Thu Aug 31 19:48:22 UTC 2006


Package: grub
Version: 0.97-14
Severity: normal

Hi,

According to the NEWS.Debian, the /sbin/ path should be removed from the
postinst_hook and postrm_hook in kernel-img.conf.

Without the full path, update-grub is normally called as postinst but not as
postrm. A strace gives a "no such file or directory" for update-grub

....

[pid 11173] chdir("/")                  = 0
[pid 11173] stat("/etc/kernel-img.conf", {st_mode=S_IFREG|0644, st_size=228,
...}) = 0
[pid 11173] stat("/etc/kernel-img.conf", {st_mode=S_IFREG|0644, st_size=228,
...}) = 0
[pid 11173] open("/etc/kernel-img.conf", O_RDONLY) = 4
[pid 11173] ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7ffff9bf41d0) = -1 ENOTTY
(Inappropriate ioctl for device)
[pid 11173] lseek(4, 0, SEEK_CUR)       = 0
[pid 11173] fstat(4, {st_mode=S_IFREG|0644, st_size=228, ...}) = 0
[pid 11173] fcntl(4, F_SETFD, FD_CLOEXEC) = 0
[pid 11173] read(4, "do_symlinks = no\nrelative_links "..., 4096) = 228
[pid 11173] read(4, "", 4096)           = 0
[pid 11173] close(4)                    = 0
[pid 11173] stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 11173] chdir("/")                  = 0
[pid 11173] stat("update-grub", 0x503140) = -1 ENOENT (No such file or
directory)
[pid 11173] stat("/etc/kernel/postrm.d", 0x503140) = -1 ENOENT (No such file or
directory)
[pid 11173] stat("/etc/kernel/postrm.d/2.6.17-k8-6", 0x503140) = -1 ENOENT (No
such file or directory)
[pid 11173] stat("/boot/initrd.img-2.6.17-k8-6", {st_mode=S_IFREG|0600,
st_size=2252366, ...}) = 0
[pid 11173] lstat("/boot/initrd.img-2.6.17-k8-6", {st_mode=S_IFREG|0600,
st_size=2252366, ...}) = 0
[pid 11173] unlink("/boot/initrd.img-2.6.17-k8-6") = 0

...


Regards

Jean-Luc

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (900, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-k8-8
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

-- no debconf information




More information about the Pkg-grub-devel mailing list