Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 205071 - net-dialup/hsfmodem - init scripts should be installed by the ebuild, not hsfconfig
Summary: net-dialup/hsfmodem - init scripts should be installed by the ebuild, not hsf...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-09 14:02 UTC by Renato Caldas
Modified: 2008-01-09 19:49 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 Renato Caldas 2008-01-09 14:02:50 UTC
The net-dialup/hsfmodem-7.68.00.04 doesn't behave properly with the init scripts.

First, it automatically adds /etc/init.d/hsf to the default runlevel.

Second, when unmerged it leaves the hsf script in the default runlevel and doesn't remove it from /etc/init.d/
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-01-09 14:18:13 UTC
(In reply to comment #0)
> First, it automatically adds /etc/init.d/hsf to the default runlevel.

No, it doesn't. In fact, it even doesn't install any initscript at all, it's the hsfconfig that creates/deletes the initscript when you run it with an appropriate option, not the ebuild.

> Second, when unmerged it leaves the hsf script in the default runlevel and
> doesn't remove it from /etc/init.d/

Nothing removes itself from any runlevel when unmerged, that's an expected behaviour.

So, what exactly are you requesting here?
Comment 2 Renato Caldas 2008-01-09 14:33:05 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > First, it automatically adds /etc/init.d/hsf to the default runlevel.
> 
> No, it doesn't. In fact, it even doesn't install any initscript at all, it's
> the hsfconfig that creates/deletes the initscript when you run it with an
> appropriate option, not the ebuild.

I see, I seem to have missed that. But shouldn't the ebuild install the init script instead of the hsfconfig tool? And shouldn't the user manually add it to the runlevel?

The ebuild says to run hsfconfig to configure the modem, but the hsfconfig tool doesn't mention the init scripts at all. So it seems to do this in an obscure way, which IMHO is wrong.

> > Second, when unmerged it leaves the hsf script in the default runlevel and
> > doesn't remove it from /etc/init.d/
> 
> Nothing removes itself from any runlevel when unmerged, that's an expected
> behaviour.
>
> So, what exactly are you requesting here?

As said before, the init script should be installed by the ebuild, and adding it to the default runlevel should be done by the user.

Please reopen the bug if you believe this makes some sense.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2008-01-09 14:47:53 UTC
Shrug; reading the hsfconfig utility, it's a complete mess and definitely a reason why noone bothered to patch it to not create the initscript...
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2008-01-09 19:23:04 UTC
Fixed (sort of) in hsfmodem-7.68.00.04-r1, hcfpcimodem-1.14-r1 and hcfusbmodem-1.14-r1 by running {hsf,hcfpci,hcfusb}config --remove in pkg_prerm when $ROOT==/ and the corespondent init script exists.

While I agree it is not desirable to create init scripts like this, I don't have an option here. Unfortunately configure scripts cannot save their work in $D without a serious amount of work. 

If you are unhappy about it, bug me with a *tested* patch that fixes the issue. Closed as WONTFIX.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2008-01-09 19:35:35 UTC
(In reply to comment #4)
> Fixed (sort of) in hsfmodem-7.68.00.04-r1, hcfpcimodem-1.14-r1 and
> hcfusbmodem-1.14-r1 by running {hsf,hcfpci,hcfusb}config --remove in pkg_prerm
> when $ROOT==/ and the corespondent init script exists.

Well, I've been thinking about this solution but it causes the initscript to be removed on re-emerging the same version as well... not really desired I'd say. I'm afraid there's no good way to do such thing.
Comment 6 Alin Năstac (RETIRED) gentoo-dev 2008-01-09 19:41:39 UTC
hsfconfig do more than simply creating the init script. I would say it is a good thing to force user to re-run hsfconfig everytime he/she installs/update hsfmodem. 
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2008-01-09 19:49:06 UTC
(In reply to comment #6)
> hsfconfig do more than simply creating the init script. I would say it is a
> good thing to force user to re-run hsfconfig everytime he/she installs/update
> hsfmodem. 

Well yeah I did read the script; seriously, all the stuff that's done via  hsfconfig should be done in src_compile if this thing wasn't packaged as a horrible home-brewed hack by upstream and was using a sane build system...

P.S. Don't get me wrong, this bug is definitely OK as WONTFIX for me ;)