Tony Nguyen wrote:
Darren Reed wrote:
Darren Reed wrote:
The webrev below contains the changes required to fix CR#6271923
according to PSARC/2009/332. If someone who is faimilar with
setproject.c could comment on those changes, that would be wonderful.

http://cr.opensolaris.org/~darrenr/6271923-20090611/

To follow on from the comments from Tony, Nico and Manno, the updated
webrev can be found here:

http://cr.opensolaris.org/~darrenr/6271923-20090615/

It includes a fix for the bug identified by Nicolas earlier, 6851264.

Darren,

Isn't it possible to have /etc/inet/dhcpsvc.conf on a system where dhcp server is disabled? If so, the existing logic in checkinstall doesn't seem sufficient.

Ok, I changed it back and forth a few times, before being
happy that I got it right the first time. After I wrote
out the comment to get my thinking straight, I realised
that there was only one situation where we want to cause
the DHCP server to be enabled. The relevant section is:

#
# ENABLE_SERVICE is being used to convey information through to the
# postinstall script that needs to decide whether or not to enable
# the DHCP server service when the system boots.
# There following scenarios need to be considered here:
# 1) pre-SMF DHCP system where dhcpsvc.conf is present, where we assume that
#    the server/service is active and we need to preserve that;
# 2) upgrade of an SMF DHCP server system where no change is made to the
#    state of DHCP service on the system;
# 3) fresh install where we do nothing.
#
if [ ! -f ${PKG_INSTALL_ROOT}/var/svc/manifest/network/dhcp-server.xml -a \
   -f ${PKG_INSTALL_ROOT}/etc/inet/dhcpsvc.conf ] ; then
       ENABLE_SERVICE="true"
fi

For case (1), we have to turn on the DHCP service in SMF, "just in case".

For cases (2) and (3), we do nothing.

There's actually two variations of (1):
- where it is disabled
- where it is enabled

If you look closely, you'll notice that we never ship
/etc/inet/dhcpsvc.conf, the system administrator must
cause it to be created. For systems that are pre-SMF,
we therefore assume that if the file exists (the administrator
has caused it to be created) then the service should
be enabled after upgrading to Solaris >= 10. This is
the only safe bet we can make here.

Darren

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to