System information

68 Sharing and maintaining SLES 10 SP2 Linux under z/VM
echo "$0: changing (escaped) $sourceName to $targetName in /etc/HOSTNAME"
sed --in-place -e "s/$sourceName/$targetName/g" /etc/HOSTNAME
echo "$0: changing $sourceHost to $targetHost and IP address in /etc/hosts"
sed --in-place -e "s/$sourceHost/$targetHost/g" \
-e "s/$sourceIP/$targetIP/g" /etc/hosts
echo "$0: changing (escaped) $sourceIP to $targetIP in $eth0file"
sed --in-place -e "s/$sourceIP/$targetIP/g" $eth0file
hostname $targetHost
}
#+--------------------------------------------------------------------------+
function genSSHkeys()
# Regenerate a set of SSH keys
#+--------------------------------------------------------------------------+
{
rm /etc/ssh/ssh_host_*
ssh-keygen -t rsa -N "" -q -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -t dsa -N "" -q -f /etc/ssh/ssh_host_dsa_key
ssh-keygen -t rsa1 -N "" -q -f /etc/ssh/ssh_host_key
}
# main()
# global variables
sourceID="S10RWMNT" # VM user ID where first Linux was installed
parmType="PARM-S10" # File type of parameter file on 191 disk
# function calls
findID
enableAdisk
findSourceIP
findTargetIP
modifyIP
genSSHkeys
chkconfig boot.findself off # run only once => turn self off
1.10.2 The boot.rootfsck.diffs file
This “diff” file is applied to modify the file /etc/init.d/boot.rootfsck:
--- boot.rootfsck.orig2009-02-10 08:02:32.000000000 -0500
+++ boot.rootfsck2009-03-12 10:18:29.000000000 -0400
@@ -3,15 +3,16 @@
# Copyright (c) 2001-2002 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
-# /etc/init.d/boot.rootfsck
+# /etc/init.d/boot.readonlyroot
+# derived from /etc/init.d/boot.rootfsck (SuSE)
#
### BEGIN INIT INFO
-# Provides: boot.rootfsck
+# Provides: boot.readonlyroot
# Required-Start:
# Required-Stop:
# Default-Start: B
# Default-Stop:
-# Description: check and mount root filesystem
+# Description: check and mount /local filesystem
### END INIT INFO