Disabling The hald-addon-storage Service On CentOS/RedHat



The haldHardware Access Layer Daemon – runs several processes in order to keep track of what hardware is installed on your system. This includes polling USB Drives and ‘hot-swap’ devices to check for changes along with a host of other tasks.

You might see it running on your system as follows:

1
2
3
4
2474 ?        S      0:00  \_ hald-runner
2481 ?        S      0:00      \_ hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
2487 ?        S      0:00      \_ hald-addon-keyboard: listening on /dev/input/event0
2495 ?        S     41:47      \_ hald-addon-storage: polling /dev/hdc

If your system is static and the devices do not change, you can actually disable this service using a policy entry.

Create a file in your policy directory, for example /etc/hal/fdi/policy/99-custom.fdi. Add the text:

1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">
    <device>
        <match key="storage.removable" bool="true">
            <remove key="info.addons" type="strlist">hald-addon-storage</remove>
        </match>
    </device>
</deviceinfo>

Save and reload the hald using /etc/init.d/haldaemon restart.

And you will find that service no longer is polling your hardware.

Of course to turn it back on, remove that policy entry and restart the haldaemon again, it will be back in service.

Solution Credit: Linuxforums User cn77