This section describes the following scripts used during the installation or postinstallation process:
modify_services
configure_nodes
As part of the configuration process, the PSE Database editor creates the
pse_modify_services script and places it in the
/var/adm/PSE/scripts directory. You must be able to issue
the rsh command as superuser (root) to the NIS master
machine.
This script connects to the Network Information
Service (NIS) master server for the services map, adding the
PSE cluster name and service port. The service port is derived from
the PSE_SERVICEPORT number. This script file adds the
new PSE cluster entry to the /var/yp/src/services
file using the port you assigned it in the editing session. Once the
services file is updated, the make utility
is invoked to compile the file on the NIS master server.
Before executing the script, always review it. For example:
rsh nismastername.xyz.abc.qwe.com -l root \ \(cd /var/yp/src\; \ cp services services.sav\; \ sed -e '/^mycluster/d' services.sav \>services\; \ echo '"mycluster 6666/tcp"' \>\> services\; \ echo '"mycluster 6666/udp"' \>\> services\; \ cd .. \; \ make\; \ \)
Review the following items in the modify_services
script before running it:
/var/yp/src/services directory.
Servers running an operating system other that
Digital UNIX might put the services
file in another directory.
Example 16-4 shows the text of the
modify_services script.
# pwd <Return>
/var/adm/PSE/pse-remote-install
# cd ../scripts <Return>
# ls <Return>
mycluster_configure_nodes mycluster_modify_services mycluster_todo_list
# cat mycluster_modify_services <Return>
#!/bin/sh
rsh hoods.xyz.abc.qwe.com -l root -n \
\(cd /var/yp/src\; \
cp services services.sav\; \
sed -e '/^mycluster/d' services.sav \>services\; \
echo '"mycluster 6666/tcp"' \>\> services\; \
echo '"mycluster 6666/udp"' \>\> services\; \
cd .. \; \
make services\; \
\)
#
The pse_configure_nodes script runs the
pseconfig facility on each machine (PSE cluster member)
you defined for the PSE cluster. The pseconfig facility
adds (or deletes) a PSE cluster domain to a node.
Example 16-5 shows the text of the
configure_nodes script.
# cat pse_mycluster_configure_nodes <Return> #!/bin/sh echo "Configuring node machine1.xyz.abc.qwe.com. ..." rsh mach1.xyz.abc.com. -l root -n /usr/sbin/pseconfig add mycluster echo Done. #