Skip to contentSkip to conversation

usage of fixed path in hotplug scripts

DISCUSSION Olaf Hering 2 participants 3 messages Apr 17, 2014 – Apr 22, 2014

lore
Share & tools
lore
#0 lore raw

Ian,

is there a reason /etc/init.d/xencommons uses a hardcoded path to /etc/xen/scripts/hotplugpath.sh, while that file actually contains all the variable paths? Should make install do some sort of

        sed "s^@XEN_SCRIPT_DIR@$XEN_SCRIPT_DIR@" \
        tools/hotplug/Linux/init.d/xencommons \
        > $DESTDIR$(XENCOMMONS_INITD)/xencommons

(or whatever the correct syntax would be)

My point is that some parts of the paths can be configured, but these paths are not used. Instead hardcoded paths are used.

Olaf

#1 lore raw
Quoted 2 lines · Olaf Hering

is there a reason /etc/init.d/xencommons uses a hardcoded path to /etc/xen/scripts/hotplugpath.sh,

I don't think so, just historical inertia I expect.

Quoted 11 lines

while that file actually contains all
the variable paths? Should make install do some sort of

        sed "s^@XEN_SCRIPT_DIR@$XEN_SCRIPT_DIR@" \
        tools/hotplug/Linux/init.d/xencommons \
        > $DESTDIR$(XENCOMMONS_INITD)/xencommons

(or whatever the correct syntax would be)

My point is that some parts of the paths can be configured, but these paths are not used. Instead hardcoded paths are used.

I think it would be fine to fix this up, so long as the defaults don't change (iirc autoconf has weird ideas about /var aka $localstatedir, see 9f7b256146dc "tools: revert to using /var and /etc/")

Ian.

#2 lore raw
Quoted 3 lines · Ian Campbell

I think it would be fine to fix this up, so long as the defaults don't change (iirc autoconf has weird ideas about /var aka $localstatedir, see 9f7b256146dc "tools: revert to using /var and /etc/")

There can be only one xen.rpm (from make rpmball) active at a time. So I think its perfectly fine to have a fixed /var dir, without $PREFIX. For /etc is more complex because some parts are system configuration (udev), other parts are internal to xen (scripts), and runlevel scripts can be started manually if needed. Adding $PREFIX to /etc feels wrong.

In any case, I will preserve existing defaults.

Olaf