Commit 4fe36df4 authored by Mike Hibler's avatar Mike Hibler
Browse files

Handle Emulab tweaks to sudoers file in the right way.

parent 46c25661
......@@ -50,7 +50,8 @@ JAILDIR = $(SYSETCDIR)/jail
ETCDIR = $(DESTDIR)$(CLIENT_ETCDIR)
BINDIR = $(DESTDIR)$(CLIENT_BINDIR)
VARDIR = $(DESTDIR)$(CLIENT_VARDIR)
RCDIR = $(DESTDIR)/usr/local/etc/rc.d
LETCDIR = $(DESTDIR)/usr/local/etc
RCDIR = $(LETCDIR)/rc.d
ISMFS = $(ETCDIR)/ismfs
INSTALL = /usr/bin/install -c
......@@ -85,6 +86,7 @@ dir-install:
$(INSTALL) -m 755 -o root -g wheel -d $(SYSETCDIR)/rc.conf.d
$(INSTALL) -m 755 -o root -g wheel -d $(ETCDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(BINDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(LETCDIR)/sudoers.d
$(INSTALL) -m 755 -o root -g wheel -d $(RCDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)
$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/db
......@@ -95,22 +97,24 @@ dir-install:
$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/lock
-rm -rf $(DESTDIR)/etc/testbed
ln -s emulab $(DESTDIR)/etc/testbed
-rm -rf $(DESTDIR)/usr/local/etc/testbed
ln -s emulab $(DESTDIR)/usr/local/etc/testbed
-rm -rf $(LETCDIR)/testbed
ln -s emulab $(LETCDIR)/testbed
basefbsd-install: dir-install
(cd ../freebsd5; $(MAKE) all install)
rm -rf $(SYSETCDIR)/rc.conf.d
rm -f $(DESTDIR)/usr/local/etc/dhclient*
ln -s /etc/dhclient-enter-hooks $(DESTDIR)/usr/local/etc/
ln -s /etc/dhclient-exit-hooks $(DESTDIR)/usr/local/etc/
rm -f $(LETCDIR)/dhclient*
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
$(INSTALL) -m 644 $(SRCDIR)/sudoers.emulab $(LETCDIR)/sudoers.d/emulab
basefbsd-subboss-install: dir-install
(cd ../freebsd5; $(MAKE) all subboss-install)
rm -rf $(SYSETCDIR)/rc.conf.d
rm -f $(DESTDIR)/usr/local/etc/dhclient*
ln -s /etc/dhclient-enter-hooks $(DESTDIR)/usr/local/etc/
ln -s /etc/dhclient-exit-hooks $(DESTDIR)/usr/local/etc/
rm -f $(LETCDIR)/dhclient*
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
$(INSTALL) -m 644 $(SRCDIR)/sudoers.emulab $(LETCDIR)/sudoers.d/emulab
tweak-syslog:
@if [ -f $(SYSETCDIR)/newsyslog.conf ]; then \
......@@ -149,9 +153,9 @@ script-install: dir-install
frisbee-mfs-install: destdircheck
(cd ../freebsd5; $(MAKE) all frisbee-mfs-install)
rm -f $(SYSETCDIR)/testbed/dhclient
rm -f $(DESTDIR)/usr/local/etc/dhclient*
ln -s /etc/dhclient-enter-hooks $(DESTDIR)/usr/local/etc/
ln -s /etc/dhclient-exit-hooks $(DESTDIR)/usr/local/etc/
rm -f $(LETCDIR)/dhclient*
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
@if [ -r $(SRCDIR)/master.passwd ]; then \
$(INSTALL) -m 600 $(SRCDIR)/master.passwd $(SYSETCDIR); \
pwd_mkdb -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
......@@ -163,9 +167,9 @@ frisbee-mfs-install: destdircheck
mfs-install:
(cd ../freebsd5; $(MAKE) all mfs-install)
rm -f $(SYSETCDIR)/testbed/dhclient
rm -f $(DESTDIR)/usr/local/etc/dhclient*
ln -s /etc/dhclient-enter-hooks $(DESTDIR)/usr/local/etc/
ln -s /etc/dhclient-exit-hooks $(DESTDIR)/usr/local/etc/
rm -f $(LETCDIR)/dhclient*
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
@if [ -r $(SRCDIR)/master.passwd ]; then \
$(INSTALL) -m 600 $(SRCDIR)/master.passwd $(SYSETCDIR); \
pwd_mkdb -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
......
# Put this file in /usr/local/etc/sudoers.d
Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR TMPDIR PACKAGEROOT PACKAGESITE PKGDIR FTP_PASSIVE_MODE"
Defaults env_keep += "PORTSDIR PORTS_INDEX PORTS_DBDIR PACKAGES PKGTOOLS_CONF"
Defaults env_keep += "EDITOR VISUAL"
%wheel ALL=(ALL) NOPASSWD: ALL
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment