Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186934 - sys-apps/hal-0.5.9-r1 does not call callout scripts
Summary: sys-apps/hal-0.5.9-r1 does not call callout scripts
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Project Gentopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-28 21:40 UTC by takken
Modified: 2007-10-10 19:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description takken 2007-07-28 21:40:19 UTC
I just updated my hal from 0.5.7.1-r5 to 0.5.9-r1. After updating config files and restarting hal, I noticed that it did not call any of my callout scripts in /usr/share/hal/scripts anymore. 

I have several home grown BASH scripts in this directory, which handle certain hardware events. When looking at the messages when running hald from a terminal, it says it is executing the scripts. Clearly, hal is lying about this.

Downgrading to 0.5.7.1-r5 fixed the issue.

Reproducible: Always

Steps to Reproduce:
1. Add custom callout script in /usr/share/hal/scripts
2. Trigger the event that should execute the callout
3. Nothing happens

Actual Results:  
Callout is not called.

Expected Results:  
Callout is called.

Portage 2.1.2.9 (default-linux/x86/2007.0/desktop, gcc-4.1.1, glibc-2.5-r2, 2.6.20-suspend2-r6 i686)
=================================================================
System uname: 2.6.20-suspend2-r6 i686 Mobile AMD Sempron(tm) Processor 3400+
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 26 Jul 2007 09:00:10 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -msse3 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS=""
DISTDIR="/usr/portage/distfiles"
FEATURES="distcc distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://pandemonium.tiscali.de/pub/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mirror.scarlet-internet.nl/pub/gentoo http://gentoo.tiscali.nl/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ "
LINGUAS="nl"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa arts asf berkdb bitmap-fonts cairo cdparanoia cdr cli cracklib crypt cups dbus dri dts dv dvd dvdr dvdread eds emboss encode evo fam ffmpeg firefox flac fortran gdbm gif gimpprint gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde kdeenablefinal kdehiddenvisibility kerberos ldap libg++ mad matroska midi mikmod mmx mmx2 mmxext mp3 mpeg mudflap ncurses no_wxgtk1 nodrm nptl nptlonly nvidia ogg opengl openmp pam pcmcia pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline real reflection rtc sdl session sox spell spl sqlite sse sse2 ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts unicode vorbis win32codecs x86 xine xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="nl" USERLAND="GNU" VIDEO_CARDS="nv nvidia vga vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Steev Klimaszewski (RETIRED) gentoo-dev 2007-07-29 06:26:51 UTC
Would you mind attaching the log and a script?
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2007-07-30 13:38:24 UTC
Excellent. You say it's lying and provide no logs or details. I'll file this bug away where it belongs until you can provide some details since, this works for me.
Comment 3 takken 2007-10-10 18:49:58 UTC
I have a bash script in /usr/share/hal/scripts/test, which looks like this:

----------------------------------------------
#!/bin/bash

beep
echo "Callout Successful."
----------------------------------------------

The script is registered as a callout script by inserting this file in /usr/share/hal/fdi/information/20thirdparty/ :


----------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">
  <device>
    <match key="info.category" string="volume">
        <append key="info.callouts.add" type="strlist">/usr/share/hal/scripts/test</append>
        <append key="info.callouts.remove" type="strlist">/usr/share/hal/scripts/test</append>
    </match>
  </device>
</deviceinfo>

----------------------------------------------


When I insert a USB memory stick, hald says:


Run started hald-probe-storage (10000) (0)
!  full path is '/usr/libexec/hald-probe-storage', program_dir is '/usr/libexec'
/usr/libexec/hald-probe-storage exited
Run started hald-addon-storage (0) (0)
!  full path is '/usr/libexec/hald-addon-storage', program_dir is '/usr/libexec'
Run started hald-probe-volume (10000) (0)
!  full path is '/usr/libexec/hald-probe-volume', program_dir is '/usr/libexec'
/usr/libexec/hald-probe-volume exited
Run started /usr/share/hal/scripts/test (10000) (0)
!  full path is '/usr/share/hal/scripts/test', program_dir is '(null)'

No beep is produced, and the 'test' script does not print any message. 

When I revert to hal version 0.5.7.1-r5 and insert the same USB memory stick, hald says:


----------------------------------------------------
Run started hald-probe-storage (10000) (0)
!  full path is '/usr/libexec/hald-probe-storage', program_dir is '/usr/libexec'
/usr/libexec/hald-probe-storage exited
Run started hald-addon-storage (0) (0)
!  full path is '/usr/libexec/hald-addon-storage', program_dir is '/usr/libexec'
**************************************************
**************************************************
Doing addon-storage for /dev/sdb (bus usb) (drive_type disk) (udi /org/freedesktop/Hal/devices/storage_serial_Kingston_DT_Elite_HS_2_0_0790FC407003090F_0_0)
**************************************************
**************************************************
Run started hald-probe-volume (10000) (0)
!  full path is '/usr/libexec/hald-probe-volume', program_dir is '/usr/libexec'
/usr/libexec/hald-probe-volume exited
Run started /usr/share/hal/scripts/test (10000) (0)
!  full path is '/usr/share/hal/scripts/test', program_dir is '/usr/share/hal/scripts'
Callout Successful.
/usr/share/hal/scripts/test exited
----------------------------------------------------

It produces a nice beep and the message in the log. Note that the log of hal 0.5.9-r1 shows that the 'program_dir' value is 'null', and there is no message of the 'test' script exiting. This shows that hal 0.5.9-r1 fails to run the script, while hal 0.5.7.1-r5 runs it just fine.

I hope you don't mind I re-opened the bug, because I can still reproduce it, and I proveded information about how to reproduce it.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2007-10-10 19:18:22 UTC
Callouts belong in /usr/libexec, not in /usr/share/hal/scripts
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2007-10-10 19:19:22 UTC
For example the file:
/usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi     

contains:

<append key="info.callouts.add" type="strlist">hal-storage-cleanup-all-mountpoints</append>