Commit 147f5c8a authored by Leigh B. Stoller's avatar Leigh B. Stoller

Lots of stuff for running on SFS on the local nodes.

parent bacd9230
...@@ -26,6 +26,7 @@ DESTDIR = ...@@ -26,6 +26,7 @@ DESTDIR =
ETCDIR = $(DESTDIR)/etc ETCDIR = $(DESTDIR)/etc
INSTALL_DIR = $(ETCDIR)/testbed INSTALL_DIR = $(ETCDIR)/testbed
RC_DIR = $(INSTALL_DIR)/rc.d RC_DIR = $(INSTALL_DIR)/rc.d
RRC_DIR = $(DESTDIR)/usr/local/etc/rc.d
ISMFS = $(INSTALL_DIR)/ismfs ISMFS = $(INSTALL_DIR)/ismfs
INSTALL_FILES = group master.passwd setup INSTALL_FILES = group master.passwd setup
INSTALL = /usr/bin/install -c INSTALL = /usr/bin/install -c
...@@ -35,15 +36,14 @@ mfs-install: script-install bin-install ...@@ -35,15 +36,14 @@ mfs-install: script-install bin-install
echo >$(ISMFS) "This file indicates its the MFS. DO NOT DELETE!" echo >$(ISMFS) "This file indicates its the MFS. DO NOT DELETE!"
dir-install: dir-install:
-mkdir -p $(INSTALL_DIR) $(INSTALL) -m 755 -o root -g wheel -d $(INSTALL_DIR)
-mkdir -p $(RC_DIR) $(INSTALL) -m 755 -o root -g wheel -d $(RC_DIR)
misc-install: dir-install misc-install: dir-install
-rm -rf $(INSTALL_DIR)/sup/sup $(INSTALL) -m 755 -o root -g wheel -d $(INSTALL_DIR)/sup
-mkdir -p $(INSTALL_DIR)/sup
$(INSTALL) -m 755 $(SRCDIR)/supfile $(INSTALL_DIR)/supfile $(INSTALL) -m 755 $(SRCDIR)/supfile $(INSTALL_DIR)/supfile
-mkdir -p /root/.cvsup $(INSTALL) -m 750 -o root -g wheel -d $(DESTDIR)/root/.cvsup
$(INSTALL) -m 600 $(SRCDIR)/cvsup.auth /root/.cvsup/auth $(INSTALL) -m 600 $(SRCDIR)/cvsup.auth $(DESTDIR)/root/.cvsup/auth
bin-install: dir-install bin-install: dir-install
$(INSTALL) -m 755 ../tmcc $(INSTALL_DIR)/tmcc $(INSTALL) -m 755 ../tmcc $(INSTALL_DIR)/tmcc
...@@ -75,25 +75,29 @@ script-install: dir-install ...@@ -75,25 +75,29 @@ script-install: dir-install
$(INSTALL) -m 755 $(SRCDIR)/nodetype $(INSTALL_DIR)/nodetype $(INSTALL) -m 755 $(SRCDIR)/nodetype $(INSTALL_DIR)/nodetype
$(INSTALL) -m 755 $(SRCDIR)/chipset.awk $(INSTALL_DIR)/chipset.awk $(INSTALL) -m 755 $(SRCDIR)/chipset.awk $(INSTALL_DIR)/chipset.awk
$(INSTALL) -m 755 $(SRCDIR)/cpuspeed.awk $(INSTALL_DIR)/cpuspeed.awk $(INSTALL) -m 755 $(SRCDIR)/cpuspeed.awk $(INSTALL_DIR)/cpuspeed.awk
$(INSTALL) -m 755 $(SRCDIR)/control_interface $(INSTALL_DIR)/control_interface $(INSTALL) -m 755 $(SRCDIR)/control_interface \
$(INSTALL_DIR)/control_interface
$(INSTALL) -m 755 $(SRCDIR)/start_if.fxp0 $(ETCDIR)/start_if.fxp0 $(INSTALL) -m 755 $(SRCDIR)/start_if.fxp0 $(ETCDIR)/start_if.fxp0
$(INSTALL) -m 755 $(SRCDIR)/start_if.fxp1 $(ETCDIR)/start_if.fxp1 $(INSTALL) -m 755 $(SRCDIR)/start_if.fxp1 $(ETCDIR)/start_if.fxp1
$(INSTALL) -m 755 $(SRCDIR)/start_if.fxp4 $(ETCDIR)/start_if.fxp4 $(INSTALL) -m 755 $(SRCDIR)/start_if.fxp4 $(ETCDIR)/start_if.fxp4
$(INSTALL) -m 755 $(SRCDIR)/start_if.xl0 $(ETCDIR)/start_if.xl0 $(INSTALL) -m 755 $(SRCDIR)/start_if.xl0 $(ETCDIR)/start_if.xl0
$(INSTALL) -m 755 $(SRCDIR)/rc.conf $(ETCDIR)/rc.conf $(INSTALL) -m 755 $(SRCDIR)/rc.conf $(ETCDIR)/rc.conf
$(INSTALL) -m 644 $(SRCDIR)/gated_fxp0.conf $(INSTALL_DIR)/gated_fxp0.conf $(INSTALL) -m 644 $(SRCDIR)/gated_fxp0.conf \
$(INSTALL) -m 644 $(SRCDIR)/gated_fxp1.conf $(INSTALL_DIR)/gated_fxp1.conf $(INSTALL_DIR)/gated_fxp0.conf
$(INSTALL) -m 644 $(SRCDIR)/gated_fxp4.conf $(INSTALL_DIR)/gated_fxp4.conf $(INSTALL) -m 644 $(SRCDIR)/gated_fxp1.conf \
$(INSTALL_DIR)/gated_fxp1.conf
$(INSTALL) -m 644 $(SRCDIR)/gated_fxp4.conf \
$(INSTALL_DIR)/gated_fxp4.conf
$(INSTALL) -m 755 $(SRCDIR)/shutdown.sh $(RC_DIR)/shutdown.sh $(INSTALL) -m 755 $(SRCDIR)/shutdown.sh $(RC_DIR)/shutdown.sh
$(INSTALL) -m 755 $(SRCDIR)/testbed.sh $(RC_DIR)/testbed.sh $(INSTALL) -m 755 $(SRCDIR)/testbed.sh $(RRC_DIR)/testbed.sh
sfs-install: sfs-install:
$(INSTALL) -m 755 -o root -g wheel -d /etc/sfs $(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/etc/sfs
$(INSTALL) -m 755 $(SRCDIR)/sfs.sh $(RC_DIR)/sfs.sh $(INSTALL) -m 755 $(SRCDIR)/sfs.sh $(RC_DIR)/sfs.sh
$(INSTALL) -m 644 $(SRCDIR)/exports $(ETCDIR)/exports $(INSTALL) -m 644 $(SRCDIR)/exports $(ETCDIR)/exports
$(INSTALL) -m 644 $(SRCDIR)/sfsrwsd_config $(ETCDIR)/sfs/sfsrwsd_config $(INSTALL) -m 644 $(SRCDIR)/sfsrwsd_config $(ETCDIR)/sfs/sfsrwsd_config
$(INSTALL) -m 644 $(SRCDIR)/sfssd_config $(ETCDIR)/sfs/sfssd_config $(INSTALL) -m 644 $(SRCDIR)/sfssd_config $(ETCDIR)/sfs/sfssd_config
$(INSTALL) -m 755 -o sfs -g sfs -d /var/sfs $(INSTALL) -m 755 -o sfs -g sfs -d $(DESTDIR)/var/sfs
$(INSTALL) -m 775 -o sfs -g sfs -d /var/sfs/root $(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/root
$(INSTALL) -m 775 -o sfs -g sfs -d /var/sfs/root/var $(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/root/var
$(INSTALL) -m 775 -o sfs -g sfs -d /var/sfs/root/usr $(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/root/usr
...@@ -9,6 +9,9 @@ sendmail_enable="NO" ...@@ -9,6 +9,9 @@ sendmail_enable="NO"
sshd_enable="YES" sshd_enable="YES"
nfs_client_enable="YES" nfs_client_enable="YES"
# For SFS
nfs_server_enable="YES"
xntpd_enable="YES" xntpd_enable="YES"
ntpdate_enable="YES" ntpdate_enable="YES"
ntpdate_flags="boss.emulab.net" ntpdate_flags="boss.emulab.net"
......
...@@ -22,23 +22,25 @@ all: ...@@ -22,23 +22,25 @@ all:
include $(TESTBED_SRCDIR)/GNUmakerules include $(TESTBED_SRCDIR)/GNUmakerules
INSTALL_DIR = /etc/rc.d/testbed DESTDIR =
ETCDIR = $(DESTDIR)/etc
RC_DIR = $(ETCDIR)/rc.d
INSTALL_DIR = $(RC_DIR)/testbed
INSTALL_FILES = group gshadow passwd rc.testbed setup shadow INSTALL_FILES = group gshadow passwd rc.testbed setup shadow
INSTALL = /usr/bin/install -c INSTALL = /usr/bin/install -c
install: misc-install script-install bin-install install: misc-install script-install bin-install
dir-install: dir-install:
-mkdir -p $(INSTALL_DIR) $(INSTALL) -m 755 -o root -g wheel -d $(INSTALL_DIR)
-rm -f /etc/testbed -rm -f /etc/testbed
-ln -s $(INSTALL_DIR) /etc/testbed -ln -s $(INSTALL_DIR) /etc/testbed
misc-install: dir-install misc-install: dir-install
-rm -rf $(INSTALL_DIR)/sup/sup $(INSTALL) -m 755 -o root -g wheel -d $(INSTALL_DIR)/sup
-mkdir -p $(INSTALL_DIR)/sup
$(INSTALL) -m 755 $(SRCDIR)/supfile $(INSTALL_DIR)/supfile $(INSTALL) -m 755 $(SRCDIR)/supfile $(INSTALL_DIR)/supfile
-mkdir -p /root/.cvsup $(INSTALL) -m 750 -o root -g wheel -d $(DESTDIR)/root/.cvsup
$(INSTALL) -m 600 $(SRCDIR)/cvsup.auth /root/.cvsup/auth $(INSTALL) -m 600 $(SRCDIR)/cvsup.auth $(DESTDIR)/root/.cvsup/auth
bin-install: dir-install bin-install: dir-install
$(INSTALL) -m 755 ../tmcc $(INSTALL_DIR)/tmcc $(INSTALL) -m 755 ../tmcc $(INSTALL_DIR)/tmcc
...@@ -62,23 +64,44 @@ script-install: dir-install ...@@ -62,23 +64,44 @@ script-install: dir-install
$(INSTALL) -m 755 $(SRCDIR)/update $(INSTALL_DIR)/update $(INSTALL) -m 755 $(SRCDIR)/update $(INSTALL_DIR)/update
$(INSTALL) -m 755 $(SRCDIR)/sethostname $(INSTALL_DIR)/sethostname $(INSTALL) -m 755 $(SRCDIR)/sethostname $(INSTALL_DIR)/sethostname
$(INSTALL) -m 644 $(SRCDIR)/hosts $(INSTALL_DIR)/hosts $(INSTALL) -m 644 $(SRCDIR)/hosts $(INSTALL_DIR)/hosts
$(INSTALL) -m 644 $(SRCDIR)/pump.conf /etc/pump.conf $(INSTALL) -m 644 $(SRCDIR)/pump.conf $(ETCDIR)/pump.conf
$(INSTALL) -m 755 $(SRCDIR)/chipset.awk $(INSTALL_DIR)/chipset.awk $(INSTALL) -m 755 $(SRCDIR)/chipset.awk $(INSTALL_DIR)/chipset.awk
$(INSTALL) -m 755 $(SRCDIR)/cpuspeed.awk $(INSTALL_DIR)/cpuspeed.awk $(INSTALL) -m 755 $(SRCDIR)/cpuspeed.awk $(INSTALL_DIR)/cpuspeed.awk
$(INSTALL) -m 755 $(SRCDIR)/nodetype $(INSTALL_DIR)/nodetype $(INSTALL) -m 755 $(SRCDIR)/nodetype $(INSTALL_DIR)/nodetype
$(INSTALL) -m 755 $(SRCDIR)/control_interface $(INSTALL_DIR)/control_interface $(INSTALL) -m 755 $(SRCDIR)/control_interface \
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0 $(INSTALL_DIR)/control_interface
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth1 $(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth0 \
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth2 /etc/sysconfig/network-scripts/ifcfg-eth2 $(ETCDIR)/sysconfig/network-scripts/ifcfg-eth0
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth3 /etc/sysconfig/network-scripts/ifcfg-eth3 $(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth1 \
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth4 /etc/sysconfig/network-scripts/ifcfg-eth4 $(ETCDIR)/sysconfig/network-scripts/ifcfg-eth1
$(INSTALL) -m 644 $(SRCDIR)/gated_eth0.conf $(INSTALL_DIR)/gated_eth0.conf $(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth2 \
$(INSTALL) -m 644 $(SRCDIR)/gated_eth2.conf $(INSTALL_DIR)/gated_eth2.conf $(ETCDIR)/sysconfig/network-scripts/ifcfg-eth2
$(INSTALL) -m 644 $(SRCDIR)/gated_eth4.conf $(INSTALL_DIR)/gated_eth4.conf $(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth3 \
$(INSTALL) -m 755 $(SRCDIR)/S12testbed /etc/rc.d/rc3.d/S12testbed $(ETCDIR)/sysconfig/network-scripts/ifcfg-eth3
$(INSTALL) -m 755 $(SRCDIR)/tbshutdown /etc/rc.d/init.d/ $(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth4 \
-ln -s /etc/rc.d/init.d/tbshutdown /etc/rc.d/rc3.d/S13tbshutdown $(ETCDIR)/sysconfig/network-scripts/ifcfg-eth4
-ln -s /etc/rc.d/init.d/tbshutdown /etc/rc.d/rc6.d/K13tbshutdown $(INSTALL) -m 644 $(SRCDIR)/gated_eth0.conf \
$(INSTALL) -m 755 $(SRCDIR)/sfs.sh /etc/rc.d/init.d/sfs.sh $(INSTALL_DIR)/gated_eth0.conf
-ln -s /etc/rc.d/init.d/sfs.sh /etc/rc.d/rc3.d/S50sfs $(INSTALL) -m 644 $(SRCDIR)/gated_eth2.conf \
-ln -s /etc/rc.d/init.d/sfs.sh /etc/rc.d/rc6.d/K50sfs $(INSTALL_DIR)/gated_eth2.conf
$(INSTALL) -m 644 $(SRCDIR)/gated_eth4.conf \
$(INSTALL_DIR)/gated_eth4.conf
$(INSTALL) -m 755 $(SRCDIR)/S12testbed $(RC_DIR)/rc3.d/S12testbed
$(INSTALL) -m 755 $(SRCDIR)/tbshutdown $(RC_DIR)/init.d/tbshutdown
-ln -s $(RC_DIR)/init.d/tbshutdown $(RC_DIR)/rc3.d/S13tbshutdown
-ln -s $(RC_DIR)/init.d/tbshutdown $(RC_DIR)/rc6.d/K13tbshutdown
sfs-install:
$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/etc/sfs
$(INSTALL) -m 755 $(SRCDIR)/sfs.sh $(RC_DIR)/init.d/sfs.sh
-ln -s $(RC_DIR)/init.d/nfs $(RC_DIR)/rc3.d/S20nfs
-ln -s $(RC_DIR)/init.d/sfs.sh $(RC_DIR)/rc3.d/S50sfs
-ln -s $(RC_DIR)/init.d/sfs.sh $(RC_DIR)/rc3.d/K19sfs
-ln -s $(RC_DIR)/init.d/sfs.sh $(RC_DIR)/rc6.d/K19sfs
$(INSTALL) -m 644 $(SRCDIR)/exports $(ETCDIR)/exports
$(INSTALL) -m 644 $(SRCDIR)/sfsrwsd_config $(ETCDIR)/sfs/sfsrwsd_config
$(INSTALL) -m 644 $(SRCDIR)/sfssd_config $(ETCDIR)/sfs/sfssd_config
$(INSTALL) -m 755 -o sfs -g sfs -d $(DESTDIR)/var/sfs
$(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/root
$(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/var
$(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/usr
/ localhost(rw,no_root_squash)
...@@ -26,4 +26,5 @@ pppusers:x:44: ...@@ -26,4 +26,5 @@ pppusers:x:44:
popusers:x:45: popusers:x:45:
slipusers:x:46: slipusers:x:46:
xfs:x:43: xfs:x:43:
sfs:x:77:
abone:x:500: abone:x:500:
...@@ -26,3 +26,4 @@ pppusers:x:: ...@@ -26,3 +26,4 @@ pppusers:x::
popusers:x:: popusers:x::
slipusers:x:: slipusers:x::
xfs:!:: xfs:!::
sfs:!::
...@@ -15,6 +15,7 @@ gopher:x:13:30:gopher:/usr/lib/gopher-data: ...@@ -15,6 +15,7 @@ gopher:x:13:30:gopher:/usr/lib/gopher-data:
ftp:x:14:50:FTP User:/home/ftp: ftp:x:14:50:FTP User:/home/ftp:
nobody:x:99:99:Nobody:/: nobody:x:99:99:Nobody:/:
xfs:x:43:43:X Font Server:/etc/X11/fs:/bin/false xfs:x:43:43:X Font Server:/etc/X11/fs:/bin/false
sfs:x:77:77:SFS:/:/bin/false
abocc:x:500:500:Abone administration:/local/abocc:/bin/bash abocc:x:500:500:Abone administration:/local/abocc:/bin/bash
anee1:x:501:500:Abone EE Account:/local/anee1:/bin/bash anee1:x:501:500:Abone EE Account:/local/anee1:/bin/bash
anee2:x:502:500:Abone EE Account:/local/anee2:/bin/bash anee2:x:502:500:Abone EE Account:/local/anee2:/bin/bash
......
...@@ -46,6 +46,15 @@ if (@ARGV) { ...@@ -46,6 +46,15 @@ if (@ARGV) {
} }
} }
my $domain = `dnsdomainname`;
chomp($domain);
if ($domain =~ /[\w\.]+/) {
$domain = ".$domain";
}
else {
$domain = ".foo.net";
}
my $nickname = whatsmynickname(); my $nickname = whatsmynickname();
if (! $nickname) { if (! $nickname) {
print STDOUT "No Testbed nickname available!\n"; print STDOUT "No Testbed nickname available!\n";
...@@ -53,9 +62,9 @@ if (! $nickname) { ...@@ -53,9 +62,9 @@ if (! $nickname) {
} }
$nickname = lc($nickname); $nickname = lc($nickname);
print STDOUT "Resetting hostname to ${nickname} ... "; print STDOUT "Resetting hostname to ${nickname}${domain} ... ";
if (system("hostname", "${nickname}")) { if (system("hostname", "${nickname}${domain}")) {
print STDOUT "*** FAILED!\n"; print STDOUT "*** FAILED!\n";
exit 1; exit 1;
} }
......
Export /var/sfs/root /
Export /var /var
Export /usr /usr
Server *
Release *
Service 1 /usr/local/lib/sfs/sfsrwsd
Service 2 /usr/local/lib/sfs/sfsauthd
Service 3 /usr/local/lib/sfs/rexd
...@@ -15,6 +15,7 @@ gopher:*:11152:0:99999:7::: ...@@ -15,6 +15,7 @@ gopher:*:11152:0:99999:7:::
ftp:*:11152:0:99999:7::: ftp:*:11152:0:99999:7:::
nobody:*:11152:0:99999:7::: nobody:*:11152:0:99999:7:::
xfs:!!:11169:0:99999:7::: xfs:!!:11169:0:99999:7:::
sfs:!!:11152:0:99999:7:::
abocc:!!:11311:0:99999:7::: abocc:!!:11311:0:99999:7:::
anee1:!!:11311:0:99999:7::: anee1:!!:11311:0:99999:7:::
anee2:!!:11311:0:99999:7::: anee2:!!:11311:0:99999:7:::
......
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