DragonFlyBSD / DPorts

The dedicated application build system for DragonFly BSD
Other
92 stars 44 forks source link

Apache24 expects service command to be available #90

Closed fupjack closed 10 years ago

fupjack commented 10 years ago

apachectl restart

/usr/local/sbin/apachectl: /usr/sbin/service: not found

The Apache 2.4 port installs an 'apachectl' script that thinks the command to invoke the apache service is:

SERVICE='/usr/sbin/service apache24'

I have a possibly naive fix here:

http://bugs.dragonflybsd.org/pastes/449

ftigeot commented 10 years ago

Can we not implement the 'service' command instead ? It's present on many recent operating systems, not just FreeBSD; most sysadmins types will expect to have it available. We already have had a few inquiries from people beeing confused by its absence.

fupjack commented 10 years ago

I have no objection to the 'service' command; I put the patch in because 1: I didn't know if there were other scripts affected, though there probably are, and 2: it's bad form to file a bug report without even an attempt at including a fix. Porting the service command over is something I've been meaning to look at but I have not had the time to do even that basic part.

jrmarino commented 10 years ago

or match patch apachectl to do something else? I don't understand how apachectl calls /usr/bin/service if freebsd doesn't have it either. Is it just broken?

ftigeot commented 10 years ago

FreeBSD has /usr/sbin/service

fupjack commented 10 years ago

apachectl calls service because apachectl is a shell script and has this in it:

SERVICE='/usr/sbin/service apache24' $SERVICE $( echo $ACMD | tr -d '-' )

Franco imported service recently, but I don't think it's tied into the build?

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/548a3528e8c57ab9ffebec5fd1820aa09e6e09bf

jrmarino commented 10 years ago

fupjack, I was confused by this, "It's present on many recent operating systems, not just FreeBSD;" From the context, you meant to say, "It's present on many recent operating systems, not just DragonFly".

You can see my confusion since the request was to add service command even though FreeBSD doesn't have it. I didn't see how that would fix anything. ftigeot cleared up the confusion.

ftigeot commented 10 years ago

I don't see anyone saying in this thread the service command wasn't available on FreeBSD.

Anyway, it was only available on 3.9. I have cherry-picked it to the DragonFly 3.8 branch.

jrmarino commented 10 years ago

I was mistake, ftigeot was the one who said it wasn't available on freebsd. again, I quote "It's present on many recent operating systems, not just FreeBSD; ", the second comment of the thread.

So with the mfc to 3.8, this issue can be closed right?

ftigeot commented 10 years ago

Uh, I meant to say it was available on much more operating systems than FreeBSD. Closing.

jrmarino commented 10 years ago

ha, you're right! It does say that. I kept reading, "just not FreeBSD" instead of "not just FreeBSD". Every single time!