Commit 7a872f2a authored by Leigh B. Stoller's avatar Leigh B. Stoller

More cleanup of the widearea/ron install stuff.

parent c5fbc0b0
......@@ -8,6 +8,7 @@ DESTDIR =
INSTALL_DIR = $(DESTDIR)/usr/local/etc/emulab
RC_DIR = $(DESTDIR)/usr/local/etc/rc.d
OLD_DIR = $(DESTDIR)/usr/local/etc/testbed
SBIN_DIR = $(DESTDIR)/usr/local/sbin
INSTALL = /usr/bin/install -c
INSTALL_PROG = /usr/bin/install -c -m 755
DISTFILES = makefile decls.h libsetup.pm ssl.c ssl.h tmcc.c
......@@ -37,12 +38,15 @@ emulab-install: misc-install script-install bin-install post-install
dir-install:
$(INSTALL) -d -m 755 -o root -g wheel $(INSTALL_DIR)
$(INSTALL) -d -m 755 -o root -g wheel $(SBIN_DIR)
$(INSTALL) -d -m 750 -o root -g wheel $(INSTALL_DIR)/.cvsup
$(INSTALL) -d -m 755 -o root -g wheel $(DESTDIR)/var/emulab
$(INSTALL) -d -m 755 -o root -g wheel $(DESTDIR)/var/emulab/sup
$(INSTALL) -d -m 755 -o root -g wheel $(DESTDIR)/var/log/vtund
$(INSTALL) -d -m 755 -o root -g wheel $(DESTDIR)/var/lock/vtund
$(INSTALL) -d -m 755 -o root -g wheel $(RC_DIR)
cp /dev/null $(INSTALL_DIR)/isrem
if [ ! -L $(OLD_DIR) ]; then \
if [ -e $(OLD_DIR) -a ! -L $(OLD_DIR) ]; then \
cp -p $(OLD_DIR)/passdb.db /var/tmp; \
cp -p $(OLD_DIR)/groupdb.db /var/tmp; \
cp -p $(OLD_DIR)/passdb.db $(INSTALL_DIR); \
......@@ -64,6 +68,7 @@ bin-install: dir-install tmcc
$(INSTALL_PROG) tmcc $(INSTALL_DIR)/tmcc
$(INSTALL_PROG) trafgen $(INSTALL_DIR)/trafgen
$(INSTALL_PROG) vtund $(INSTALL_DIR)/vtund
$(INSTALL_PROG) vtund $(SBIN_DIR)/vtund
script-install: dir-install
for file in $(WAFILES); do \
......@@ -81,10 +86,13 @@ script-install: dir-install
$(INSTALL_PROG) $(SRCDIR)/cvsup.sh $(RC_DIR)/0.cvsup.sh
post-install:
for file in $(WAFILES); do \
chown emulabman $(INSTALL_DIR)/$$file; \
chgrp bin $(INSTALL_DIR)/$$file; \
done
./install.sh
(chown emulabman $(INSTALL_DIR) $(INSTALL_DIR)/*)
(chgrp bin $(INSTALL_DIR) $(INSTALL_DIR)/*)
# for file in $(WAFILES); do \
# chown emulabman $(INSTALL_DIR)/$$file; \
# chgrp bin $(INSTALL_DIR)/$$file; \
# done
chown emulabman $(INSTALL_DIR)/libsetup.pm
chgrp bin $(INSTALL_DIR)/libsetup.pm
chown root $(INSTALL_DIR)/update
......@@ -116,7 +124,7 @@ dist: trafgen
for file in $(BSDFILES); do cp freebsd/$$file $(DISTDIR); done
cp /usr/testbed/etc/emulab.pem $(DISTDIR)
cp /usr/local/sbin/vtund $(DISTDIR)
cp $(TRAFGEN) $(DISTDIR)
cp $(TRAFGEN) $(DISTDIR)/trafgen
trafgen:
ifndef TRAFGEN
......
......@@ -14,16 +14,8 @@ endif
$USERADD emulabman -u 65520 -g bin -m -s /bin/tcsh -c "Emulab Man"
cd /usr/local/etc/emulab
if ($OSTYPE == "FreeBSD") then
ln -s liblocsetup-freebsd.pm liblocsetup.pm
rm -f /usr/local/etc/rc.d/testbed.sh
rm -f /usr/local/etc/rc.d/emulab.sh
rm -f /usr/local/etc/rc.d/z.emulab.sh
cp -f rc.testbed /usr/local/etc/rc.d/z.emulab.sh
rm -f /usr/local/etc/rc.d/0.cvsup.sh
cp -f cvsup.sh /usr/local/etc/rc.d/0.cvsup.sh
else
if ($OSTYPE == "Linux") then
cd /usr/local/etc/emulab
ln -s liblocsetup-linux.pm liblocsetup.pm
rm -f /etc/init.d/emulab
cp rc.testbed /etc/init.d/emulab
......@@ -34,22 +26,6 @@ else
rm -f /etc/rc5.d/S99emulab
ln -s ../init.d/emulab /etc/rc5.d/S99emulab
endif
chown emulabman . *
chgrp bin . *
chown root update vnodesetup
chmod u+s update vnodesetup
chown root /usr/bin/suidperl
chmod u+s /usr/bin/suidperl
chown emulabman client.pem emulab.pem
chmod 640 client.pem emulab.pem
/usr/bin/install -c -o root -g wheel -d -m 755 /var/emulab
/usr/bin/install -c -o root -g wheel -d -m 755 /var/emulab/sup
if ( -e vtund ) then
cp vtund /usr/local/sbin
/usr/bin/install -c -o root -g wheel -d -m 755 /var/log/vtund
/usr/bin/install -c -o root -g wheel -d -m 755 /var/lock/vtund
endif
if (! -d ~emulabman/.ssh) then
cd ~emulabman
......@@ -65,4 +41,4 @@ if (! -d ~emulabman/.ssh) then
chmod 644 authorized_keys
endif
exit 0;
Markdown is supported
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