services module rewritten
Zbigniew Luszpinski
zbiggy at o2.pl
Tue Jul 17 00:46:00 CEST 2007
Monday 16 of July 2007 22:55:38 Kok, Auke wrote:
> still don't like this - this again throws away any user-made entries
> previously made.
Not true if you update /etc/services to 1.0 version. Have you tried new
services format 1.0? If so add something at right place in services and check
if it survives update/lining? I checked and I'm sure it does.
This is the same situation as with:
http://www.lunar-linux.org/index.php?option=com_content&task=view&id=52&Itemid=1
If /etc/services file is not compatible with 1.0 Lunar services format (which
comes with services module) the services module won't be installed and you
end up with message saying you need to remove /etc/services
Now you can:
a) not install services module and keep using what you have
b) start using new services module by deleting old /etc/services
The best way to make b) working is:
1. move /etc/services to safe place.
2. then remove /etc/services
3. lin services
(services module will detect there is no /etc/services and will build new one)
The new, created /etc/services will be saved as new Lunar 1.0 format and this
one is updatable. Now you can copy paste your nonstandard services to the end
of services file. There is special section which will hold them and protect
against overwritting during updates.
Now you can lin services module again to see that entries in protected user
section are still there.
If you have mess in /etc/services where iana entries are mixed with local
entries you may not like new format which forces order and division to
iana/lunar/local group of entries. If so consider services file cleanup - it
will make future Lunar iso changes easier (in case where you not
overwrite /etc/services with the one from backup).
And you can always keep an eye on a list of nonstandard entries you added
because you have them in one section.
> Either make a smart script (in POST_INSTALL) that *inserts* new entries in
> the right location (sorted) or forget about this, you're wasting your time.
No. Sorting has no sense. I constructed services file in a way which allow
prioritization. Thanks to this if you want to temporary run local service on
for example port 110 you do not have to delete/modify pop3 in services file.
Just add another blahblah 110/tcp definition in user section at the bottom of
file and you are done. If local service blahblah is not needed on 110 port
anymore just simply remove 110 definition from local user section.
The current layout has the following priorities:
1. local user services
2. lunar services
3. iana services.
So if the same port number is in local user list and in iana list the entry
from user list is taken.
If you really need to have sorted entries why not sorting them on demand via
script without changing order inside file? I do not find any reason forcing
me to sort entries in /etc/services. The ordinary apps just query services in
order I described.
Zbigniew
More information about the Lunar-dev
mailing list