summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2018-10-02 15:39:04 +1000
committerMartin Schwenke <martin@meltin.net>2019-03-25 16:52:25 +1100
commitacab4ff108c902fec404582e9a6fb50cc81a2c04 (patch)
treeb94507f4f95f15140a446961ca048b5d074b2340 /base
parent5cc52f23c345faf13daf579c3e8eaafb5a08a56c (diff)
downloadautocluster-acab4ff108c902fec404582e9a6fb50cc81a2c04.tar.gz
autocluster-acab4ff108c902fec404582e9a6fb50cc81a2c04.tar.xz
autocluster-acab4ff108c902fec404582e9a6fb50cc81a2c04.zip
Remove bash autocluster script and supporting files
Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'base')
-rw-r--r--base/all/etc/chrony.conf41
-rw-r--r--base/all/etc/hostname1
-rw-r--r--base/all/etc/hosts5
-rwxr-xr-xbase/all/etc/init.d/iscsimultipath113
-rw-r--r--base/all/etc/multipath.conf8
-rw-r--r--base/all/etc/ntp.conf3
-rw-r--r--base/all/etc/resolv.conf3
-rw-r--r--base/all/etc/rsyslog.d/autocluster.conf14
-rw-r--r--base/all/etc/ssh/ssh_host_dsa_key12
-rw-r--r--base/all/etc/ssh/ssh_host_dsa_key.pub1
-rw-r--r--base/all/etc/ssh/ssh_host_keybin963 -> 0 bytes
-rw-r--r--base/all/etc/ssh/ssh_host_key.pub1
-rw-r--r--base/all/etc/ssh/ssh_host_rsa_key27
-rw-r--r--base/all/etc/ssh/ssh_host_rsa_key.pub1
-rw-r--r--base/all/etc/sysconfig/network5
-rw-r--r--base/all/etc/sysconfig/prelink3
-rw-r--r--base/all/root/.ssh/authorized_keys3
-rw-r--r--base/all/root/.ssh/config4
-rw-r--r--base/all/root/.ssh/id_rsa28
-rw-r--r--base/all/root/.ssh/id_rsa.pub1
-rw-r--r--base/all/root/scripts/cluster_configure/.gitignore2
-rw-r--r--base/all/root/scripts/cluster_configure/README168
-rw-r--r--base/all/root/scripts/cluster_configure/TODO3
-rwxr-xr-xbase/all/root/scripts/cluster_configure/cluster-configure.py452
-rw-r--r--base/all/root/scripts/cluster_configure/example.conf55
-rw-r--r--base/all/root/scripts/cluster_configure/lib/util.py37
-rwxr-xr-xbase/all/root/scripts/cluster_configure/mkchroot.sh196
-rw-r--r--base/all/root/scripts/cluster_configure/plugins/ctdb.py51
-rwxr-xr-xbase/all/root/scripts/cluster_configure/plugins/export.py102
-rw-r--r--base/all/root/scripts/cluster_configure/plugins/package.py41
-rw-r--r--base/all/root/scripts/cluster_configure/plugins/share.py57
-rwxr-xr-xbase/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/events/post11
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses1
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.dual1
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.ipv41
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.ipv61
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/sysconfig/ctdb20
-rwxr-xr-xbase/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/events/post11
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/ctdb.conf6
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses1
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.dual1
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv41
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv61
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/script.options8
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/sysconfig/ctdb20
-rwxr-xr-xbase/all/root/scripts/cluster_configure/templates/rhel/01.gpfs.base/3.3#/events/post11
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/01.gpfs.base/3.3#/files/etc/sysconfig/gpfs1
-rwxr-xr-xbase/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/events/post21
-rwxr-xr-xbase/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/events/pre22
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/pam.d/vsftpd10
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/sysconfig/vsftpd1
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/vsftpd/vsftpd.conf22
-rwxr-xr-xbase/all/root/scripts/cluster_configure/templates/rhel/41.httpd/2.2#/events/post2
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/41.httpd/2.2#/files/etc/httpd/conf.d/shares.config1
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/42.rssh/2.3.2#/files/etc/rssh.conf4
-rwxr-xr-xbase/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/events/post21
-rwxr-xr-xbase/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/events/pre23
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/files/etc/sysconfig/sshd2
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/50.samba/3.4#/files/etc/samba/smb.conf53
-rwxr-xr-xbase/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/events/post2
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/files/etc/exports1
-rw-r--r--base/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/files/etc/sysconfig/nfs9
-rwxr-xr-xbase/all/root/scripts/cluster_setup.sh48
-rw-r--r--base/all/root/scripts/nas.conf59
-rwxr-xr-xbase/all/root/scripts/setup_segv_handler.sh104
-rwxr-xr-xbase/all/root/scripts/setup_tsm_client.sh160
-rwxr-xr-xbase/all/root/scripts/setup_tsm_server.sh118
-rwxr-xr-xbase/all/root/scripts/tasks/install_ad.sh6
-rwxr-xr-xbase/all/root/scripts/tasks/install_build.sh20
-rwxr-xr-xbase/all/root/scripts/tasks/install_clusterfs_gpfs.sh23
-rwxr-xr-xbase/all/root/scripts/tasks/install_extra_packages.sh12
-rwxr-xr-xbase/all/root/scripts/tasks/install_nas.sh16
-rwxr-xr-xbase/all/root/scripts/tasks/setup_cluster_nas.sh63
-rwxr-xr-xbase/all/root/scripts/tasks/setup_clusterfs_gpfs.sh208
-rwxr-xr-xbase/all/root/scripts/tasks/setup_node_ad.sh62
-rwxr-xr-xbase/all/root/scripts/tasks/setup_node_build.sh7
-rwxr-xr-xbase/all/root/scripts/tasks/setup_node_nas.sh39
-rwxr-xr-xbase/all/sbin/scsi_id_autocluster.sh3
-rw-r--r--base/rhel_base/etc/hosts5
79 files changed, 0 insertions, 2681 deletions
diff --git a/base/all/etc/chrony.conf b/base/all/etc/chrony.conf
deleted file mode 100644
index b7eb8ac..0000000
--- a/base/all/etc/chrony.conf
+++ /dev/null
@@ -1,41 +0,0 @@
-server @@KVMHOST@@ iburst
-
-# Ignore stratum in source selection.
-stratumweight 0
-
-# Record the rate at which the system clock gains/losses time.
-driftfile /var/lib/chrony/drift
-
-# Enable kernel RTC synchronization.
-rtcsync
-
-# In first three updates step the system clock instead of slew
-# if the adjustment is larger than 10 seconds.
-makestep 10 3
-
-# Allow NTP client access from local network.
-#allow 192.168/16
-
-# Listen for commands only on localhost.
-bindcmdaddress 127.0.0.1
-bindcmdaddress ::1
-
-# Serve time even if not synchronized to any NTP server.
-#local stratum 10
-
-keyfile /etc/chrony.keys
-
-# Specify the key used as password for chronyc.
-commandkey 1
-
-# Generate command key if missing.
-generatecommandkey
-
-# Disable logging of client accesses.
-noclientlog
-
-# Send a message to syslog if a clock adjustment is larger than 0.5 seconds.
-logchange 0.5
-
-logdir /var/log/chrony
-#log measurements statistics tracking
diff --git a/base/all/etc/hostname b/base/all/etc/hostname
deleted file mode 100644
index d55105e..0000000
--- a/base/all/etc/hostname
+++ /dev/null
@@ -1 +0,0 @@
-@@NAME@@.@@DOMAIN@@
diff --git a/base/all/etc/hosts b/base/all/etc/hosts
deleted file mode 100644
index 4d7acd6..0000000
--- a/base/all/etc/hosts
+++ /dev/null
@@ -1,5 +0,0 @@
-127.0.0.1 localhost
-
-@@@HOSTS_STATIC_ENTRIES@@@
-
-@@KVMHOST@@ kvmhost
diff --git a/base/all/etc/init.d/iscsimultipath b/base/all/etc/init.d/iscsimultipath
deleted file mode 100755
index f11c5d2..0000000
--- a/base/all/etc/init.d/iscsimultipath
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/bin/sh
-#
-# chkconfig: 345 14 88
-# description: Runs "multipath" when designated number of SCSI disks available.
-#
-# Source function library.
-. /etc/init.d/functions
-
-# Note that you should not run *chkconfig* to enable this initscript
-# on nodes where you do not expect to see autocluster iSCSI devices.
-# Doing so will merely annoy you by slowing down system boot by
-# waiting for phantom devices to appear.
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-
-RETVAL=0
-
-npaths=$((@@SHAREDDISK_COUNT@@ * @@SHARED_DISK_MULTIPATH_NUMPATHS@@))
-
-correct_number_of_devices ()
-{
- _glob="$1"
- _num_desired=$2
-
- _n=$(grep AUTCLSTR $_glob 2>/dev/null | wc -l)
-
- [ "$_n" = "$_num_desired" ]
-}
-
-wait_for_devices ()
-{
- _glob="$1"
- _num_desired=$2
- _timeout="${3:-60}"
-
- _count=0
- while : ; do
- if correct_number_of_devices "$_glob" $_num_desired ; then
- return 0
- fi
-
- if [ $_count -ge $_timeout ] ; then
- echo "TIMEOUT (iscsi)"
- return 1
- fi
-
- _count=$(($_count + 1))
- sleep 1
- done
-}
-
-sd_pat='/sys/block/sd*/device/vendor'
-slave_pat='/sys/block/dm-*/slaves/*/device/vendor'
-
-start()
-{
- echo -n "Setting up multipath for iSCSI devices:"
-
- if wait_for_devices "$sd_pat" $npaths ; then
- _c=0
- while : ; do
- multipath
- if correct_number_of_devices "$slave_pat" $npaths ; then
- break
- fi
- if [ $_c -ge 30 ] ; then
- echo "TIMEOUT (multipath)"
- failure
- RETVAL=1
- break
- fi
- multipath -F
- _c=$(($_c + 1))
- sleep 1
- done
-
- success
- echo
- else
- RETVAL=1
- failure
- fi
-}
-
-stop()
-{
- echo -n "Flushing multipath devices:"
-
- if multipath -F && \
- wait_for_devices "$slave_pat" 0 ; then
- success
- else
- RETVAL=1
- failure
- fi
-}
-
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- *)
- echo $"Usage: $0 {start|stop|restart}"
- exit 1
-esac
-exit $RETVAL
diff --git a/base/all/etc/multipath.conf b/base/all/etc/multipath.conf
deleted file mode 100644
index 5f5bc32..0000000
--- a/base/all/etc/multipath.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-defaults {
-@@RHEL_MULTIPATH_MAGIC@@
- user_friendly_names yes
-}
-
-blacklist {
- devnode "^@@SYSTEM_DISK_PREFIX@@a[0-9]*"
-}
diff --git a/base/all/etc/ntp.conf b/base/all/etc/ntp.conf
deleted file mode 100644
index f00a5e7..0000000
--- a/base/all/etc/ntp.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-server @@KVMHOST@@ burst iburst minpoll 4 maxpoll 5
-driftfile /var/lib/ntp/drift
-logfile /var/log/ntp
diff --git a/base/all/etc/resolv.conf b/base/all/etc/resolv.conf
deleted file mode 100644
index 81f217d..0000000
--- a/base/all/etc/resolv.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-domain @@DOMAIN@@
-search @@DNSSEARCH@@
-nameserver @@NAMESERVER@@
diff --git a/base/all/etc/rsyslog.d/autocluster.conf b/base/all/etc/rsyslog.d/autocluster.conf
deleted file mode 100644
index 6478b45..0000000
--- a/base/all/etc/rsyslog.d/autocluster.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-# Select a high precision time format. This allows accurate merging
-# of logs from multiple cluster nodes for easier CTDB debugging.
-$ActionFileDefaultTemplate RSYSLOG_FileFormat
-
-# Turn off rate-limiting. Why would we want to lose messages by
-# default?
-$SystemLogRateLimitInterval 0
-$SystemLogRateLimitBurst 0
-
-# Turn on UDP listener to be able to take advantage of CTDB's new
-# direct-to-syslog-on-UDP feature.
-$ModLoad imudp
-$UDPServerAddress 127.0.0.1
-$UDPServerRun 514
diff --git a/base/all/etc/ssh/ssh_host_dsa_key b/base/all/etc/ssh/ssh_host_dsa_key
deleted file mode 100644
index 6e39156..0000000
--- a/base/all/etc/ssh/ssh_host_dsa_key
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN DSA PRIVATE KEY-----
-MIIBuwIBAAKBgQDTH5zgb1vZnizu+Fqlotm8u9IqiQcRYyuyEkawjSps7ZvZh4Ax
-x7ldgrgCmFu00+uUSMYBbbK+f0ElC9ID2KTYfT+RIdXrvmKQ4HDxwC0mZD0XN7zd
-N93ErHwQmqgfe5Bb0Lh3BwohgQ8vxm/mTJIeBfkCmSf0YBlw0Flb5a0TSwIVAOzs
-ta8M9YH993nZkvRBQNKCw2PbAoGAAQiMOGZSVi553IA0+2VyFzkPLG86mznpN2wv
-0+iqnq7cGi1SVsUcK1M66h1Qiw3u/xvGrKEnyAlR1xaPRwU5+YcRBfkdhpd43Ps2
-ul40Q6gEvrzc3zWelEcoi+Vo7K0atXbJ4eOLxKWn6hReQOyP4ntiqVyGhek444bI
-2NQRp0sCgYEAqwHjDznoTOl+88JIOc9BFfeSKlxvZwDChMrakQbFAL4ZqQzs26fA
-SkiSMxOvTRA4hBKGqSnpvF6SW0eI/i+m3slVWGy9xkUWxTT34v+lqgCtECcAGGSc
-2iFkAIzLU2gS9q9sRhoMxgu8HOo+/NuUnJjdy0XeR221xrmdNKU3bWQCFHS/MVQ3
-/dXNQ3xI5h4mc0ti9rVY
------END DSA PRIVATE KEY-----
diff --git a/base/all/etc/ssh/ssh_host_dsa_key.pub b/base/all/etc/ssh/ssh_host_dsa_key.pub
deleted file mode 100644
index 80d97eb..0000000
--- a/base/all/etc/ssh/ssh_host_dsa_key.pub
+++ /dev/null
@@ -1 +0,0 @@
-ssh-dss AAAAB3NzaC1kc3MAAACBANMfnOBvW9meLO74WqWi2by70iqJBxFjK7ISRrCNKmztm9mHgDHHuV2CuAKYW7TT65RIxgFtsr5/QSUL0gPYpNh9P5Eh1eu+YpDgcPHALSZkPRc3vN033cSsfBCaqB97kFvQuHcHCiGBDy/Gb+ZMkh4F+QKZJ/RgGXDQWVvlrRNLAAAAFQDs7LWvDPWB/fd52ZL0QUDSgsNj2wAAAIABCIw4ZlJWLnncgDT7ZXIXOQ8sbzqbOek3bC/T6KqertwaLVJWxRwrUzrqHVCLDe7/G8asoSfICVHXFo9HBTn5hxEF+R2Gl3jc+za6XjRDqAS+vNzfNZ6URyiL5WjsrRq1dsnh44vEpafqFF5A7I/ie2KpXIaF6TjjhsjY1BGnSwAAAIEAqwHjDznoTOl+88JIOc9BFfeSKlxvZwDChMrakQbFAL4ZqQzs26fASkiSMxOvTRA4hBKGqSnpvF6SW0eI/i+m3slVWGy9xkUWxTT34v+lqgCtECcAGGSc2iFkAIzLU2gS9q9sRhoMxgu8HOo+/NuUnJjdy0XeR221xrmdNKU3bWQ=
diff --git a/base/all/etc/ssh/ssh_host_key b/base/all/etc/ssh/ssh_host_key
deleted file mode 100644
index 8f60797..0000000
--- a/base/all/etc/ssh/ssh_host_key
+++ /dev/null
Binary files differ
diff --git a/base/all/etc/ssh/ssh_host_key.pub b/base/all/etc/ssh/ssh_host_key.pub
deleted file mode 100644
index b8bd0e6..0000000
--- a/base/all/etc/ssh/ssh_host_key.pub
+++ /dev/null
@@ -1 +0,0 @@
-2048 35 20252980202451949958905786764725313337742591059018852581799593004941325731099310714327202947858566997656146334485077099525517223738033871191442081516672845641770572839575436988988777429454947081523157988216378740189731911355159730114936525355069526884937750841011367193826321599742549827295523785672838108611230353132749687084270785046597241545461991807234914364306051793068637504425015601877571406092530975305081565479877615925977535784796919203701058205383547479053396551719443610956448558745988295246817729671537317690830738776230483972636404621684936576793340010515147961813822714986992626803617790163957578719817
diff --git a/base/all/etc/ssh/ssh_host_rsa_key b/base/all/etc/ssh/ssh_host_rsa_key
deleted file mode 100644
index 5cb1b98..0000000
--- a/base/all/etc/ssh/ssh_host_rsa_key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAxfDl15K5niEx5c8uv0EGkht929UuC4BEz4CuNpaVBx/dUJiY
-bs6umHEovq0CKTh9J+WfDY+/ACVJxkCn8erx+gWOqj2FbtXtfBqml8LJKfdnfI9a
-EEtzsXV+b5bTFZTuovAom77y3rfwjq1Y/GigvtLC96YABXU6UMqwye5r0A+jBAmG
-J9o4+GVpl6LoFAsH1KiJR+Q3h4oXOL5smuq6FTW9rZnPSIRWffsVVFRL7Up+Imf3
-e1zIaXrsZKtmTn00h2HhNquGLboWHIDQbKvcdCUZgFkTl+Ed1FAogi1RpRR+uepe
-1HUz4ZAYsi9SBAXMfOQpRMoZcM073bwTJvfWTwIBIwKCAQEAh7shQ11MFKkMRc/l
-inW7XN+mwqDPHdRMcQfH6urp2P/oN0QQwQLA3Y9sZX3y2m/gyuaY81tBJKva0RZk
-iKEa9JYYr0Ag+4thBKSPfgHpBtWIynDtTQCJ2MWYhwhWOq9EjPxznf9HdCZbz4zP
-Tf6aHHND3QQdRZI2nczQ/37q187+rSLLYVmbDUri+LxWAjlwoLcRNhDgtnR7wx1v
-3fn226zAuEmgdKZv78jSU9bms+03HV1dBEQKBPRqJvF75+R1XaR4w7VejWC8jBmB
-RLF1uPRM/VPpuw7KDFjbWK6oMLWIxrXrU5k6F0KTqg4IgKjZidNx0FnH1ZDW/ENX
-V9BCiwKBgQD7UNEBn8Wo8lLG1EKtq9bX2RDQBqhyakW4uxwS5kq4AWsAHFkEeMVl
-SoOChmg8l897PISWe/3dHRnLXStQF01acQhRVIvhWb4R4S0udaLtRGOUVuMNNpGa
-DrWRfs5l2Sb2fpcG9T0cw64qt4J7UcSiU4okO0lXfl7qkBaCZg8uHwKBgQDJoWXG
-mhyN6AVtGKLnpPXBETdq0mMoEy/Uq8IWkOjPaMQkhIAWJaGN9cgKvlKpjxZn2xCO
-rnuyBSdbjrVBhQKu7cm1Ggx68Hmb7wPFctt4110/jVum2y9HyO5XIgrhL492GYoL
-WqNNEUuBTVhfoUrs6wWpuah+haXCcxixYNjx0QKBgBWKlZJsx8ynDmjQXXyZs1RU
-byfGDnA0/qlvH6nZOZq+SwACbgeylJOnTRnRAZ7LLwqQKJ8vMwRS85UWnVAB/1Dl
-HfhXtDfjHuuW9T5/HJf+jDFJRqlccuFRt8qkeBdbwYLXpouRXQJ3LC+MEn+ZS15e
-7pVkKtudHhQa+p12dlRpAoGBAJuLIqCFg73tgIdcJeXlp6OQ8Dx2ab/USXgsukvs
-IU+LVXtBpKNe27anqPJYTmWLo5HyIrc2JOhqYDCv6ulmm6uEPIRkjUjlZSCFLsuE
-fWvZVpAclyjyOmqTsIxcFwV8dfwFErhNPCWCXtF2Ljskp4OQuznJvH7cIMk0N57H
-DcHbAoGBAMdOYhDiui3vqEuwPdftu25hcAWZQtcM/8aL0oLdxdyiCwQuKkh1Xz4w
-/m814QW6xAXvd8Q7apFHC1jNKtjW49qLdbNFId+20bIYbZSph1+ij6PStGyTM92e
-A/I1EIfzb4uu4g7iLdRFeKNnAJSYeE0Eb6W+QOthflmIUgIT6kAj
------END RSA PRIVATE KEY-----
diff --git a/base/all/etc/ssh/ssh_host_rsa_key.pub b/base/all/etc/ssh/ssh_host_rsa_key.pub
deleted file mode 100644
index b1a4157..0000000
--- a/base/all/etc/ssh/ssh_host_rsa_key.pub
+++ /dev/null
@@ -1 +0,0 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxfDl15K5niEx5c8uv0EGkht929UuC4BEz4CuNpaVBx/dUJiYbs6umHEovq0CKTh9J+WfDY+/ACVJxkCn8erx+gWOqj2FbtXtfBqml8LJKfdnfI9aEEtzsXV+b5bTFZTuovAom77y3rfwjq1Y/GigvtLC96YABXU6UMqwye5r0A+jBAmGJ9o4+GVpl6LoFAsH1KiJR+Q3h4oXOL5smuq6FTW9rZnPSIRWffsVVFRL7Up+Imf3e1zIaXrsZKtmTn00h2HhNquGLboWHIDQbKvcdCUZgFkTl+Ed1FAogi1RpRR+uepe1HUz4ZAYsi9SBAXMfOQpRMoZcM073bwTJvfWTw==
diff --git a/base/all/etc/sysconfig/network b/base/all/etc/sysconfig/network
deleted file mode 100644
index 482aa15..0000000
--- a/base/all/etc/sysconfig/network
+++ /dev/null
@@ -1,5 +0,0 @@
-NETWORKING=yes
-NETWORKING_IPV6=no
-HOSTNAME=@@NAME@@.@@DOMAIN@@
-PEERDNS=no
-NOZEROCONF=yes
diff --git a/base/all/etc/sysconfig/prelink b/base/all/etc/sysconfig/prelink
deleted file mode 100644
index 9558f36..0000000
--- a/base/all/etc/sysconfig/prelink
+++ /dev/null
@@ -1,3 +0,0 @@
-# we don't want prelinking on virtual machines, as it just chews
-# CPU and disk space
-PRELINKING=no
diff --git a/base/all/root/.ssh/authorized_keys b/base/all/root/.ssh/authorized_keys
deleted file mode 100644
index 3b2e069..0000000
--- a/base/all/root/.ssh/authorized_keys
+++ /dev/null
@@ -1,3 +0,0 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqb5/Xec12KIY7PiIEs9xEAL2VSgGyJ0aaYU/pd/Fe9GB9wTVH02We8fGHcbB19S0S8W4P6nyadSmVlkUflGVfs6UbFV2IZF1DYnwmTmlP98g9Em25tTcSmr1Mo2GcPJ38t7JQF28SC3hioxtXJlfqG8vi4RiFk6ujHKacPcHRgMJVruqaohqXN49Zlb6m2dfM8QkbsPzUDYksUDGXBWrDAQ7ZsTEYZVaWZ5n6qSvZ54hzZy/h71P0nTsuF4tC91LIs6L8Y1Qga3zfa+ZZZRYvBeEhmhqlUxPzVrd/MDA1CNLUApSRNZpgKMdUT8w+fw2wimwsEWyVByOM31hsqqVNQ== root@localhost
-ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEApxKsDbKMflPJp17OLG39v+VtTliqSMmy0C4ipgHLwlRwWTPQoPv0r2yTP03f4O7DABdeNwo+Hz0LxR2QNuMuZBOdri7PH27vshGBGn9OLJI4otw3Aq1m63htQxWXBEhBjZPRZ6PvSOm4RVhHviCL9rW+D3xfZYQtRTp5qDFci4ElNF7x+Z1bwZ1NVsyefcATr3vm+7KfoEqjUQ9QfuNJH0TuTTAcTjz2jQEB7gZsZ7PSpXmMK7vRSuZpf/iRLnCEPSj4nJqsMPEctedq/bKWEWggAsPvKCjr3wvpJdnPH+2zAv6IvaFzWTrLtVY/NBuGosIyXZW84LpplgPym6Z50f04yowKUBSb0vDSq5X3VwiwBdzvEiMSrz9z7fli9vcKUQWUBAAwVbhWDwOOMC2kf0KTSmVNmVMMmorjlUkGafYlUh4SYW+CRrBXi5xVGyw/7uzEWUA26UDDNanptFduAYV8DMlJXaoCDbJbmyLyQ8RJYho8KiNFLYaaZqbZq5O+NQWGcNTGAmqRjy5QD2lTUepCAiY0P24k1HHncj83b8kb8Vx3I6yfZ57y3wwKUbdlljJs+FVegScPAiMutovIeuu0G/InwjGzTAFJju5K2z1IK+CWJMokQRmuPwRcep+X3AUhnzGn6+S5FYefoLOi+8jqs3IJWO6Qk47MVSzt6Rs=
-ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxE5h7j+/TFLXXgQTBr8A5n05Uvz/C7qVAwVKk39qQM6AiGX0GSX17ugnq7FMFLWsIC/jVjY/r494iWnoZC3Ec4nMmGYMOloNJarW88N6Mk1XRWklORkZ+R+e/twGF9JfMph3aSUNSxZWJlYCVxwn22lu7WCC31TCmCVSzXe/FVTSVgjXlgJoGqksfkZ/rWSrEhXMQsuRW65aQ8IUH7oR9ZDQTiUfdJqYOSbeXQkABHLaVGrVCEkm6y+7uA9AvM/iadmBL8M+dBuS1DZmUWf+ZhiUmBRv99nYUuxjLl2mdhkqlaPkVEWkvbxOhC/kyDI8LXRsuudQIMBw8OWje29jVQ== root@localhost
diff --git a/base/all/root/.ssh/config b/base/all/root/.ssh/config
deleted file mode 100644
index 04971cb..0000000
--- a/base/all/root/.ssh/config
+++ /dev/null
@@ -1,4 +0,0 @@
-CheckHostIP no
-KeepAlive no
-Cipher blowfish
-StrictHostKeyChecking=no
diff --git a/base/all/root/.ssh/id_rsa b/base/all/root/.ssh/id_rsa
deleted file mode 100644
index 0dba5d0..0000000
--- a/base/all/root/.ssh/id_rsa
+++ /dev/null
@@ -1,28 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEogIBAAKCAQEAqb5/Xec12KIY7PiIEs9xEAL2VSgGyJ0aaYU/pd/Fe9GB9wTV
-H02We8fGHcbB19S0S8W4P6nyadSmVlkUflGVfs6UbFV2IZF1DYnwmTmlP98g9Em2
-5tTcSmr1Mo2GcPJ38t7JQF28SC3hioxtXJlfqG8vi4RiFk6ujHKacPcHRgMJVruq
-aohqXN49Zlb6m2dfM8QkbsPzUDYksUDGXBWrDAQ7ZsTEYZVaWZ5n6qSvZ54hzZy/
-h71P0nTsuF4tC91LIs6L8Y1Qga3zfa+ZZZRYvBeEhmhqlUxPzVrd/MDA1CNLUApS
-RNZpgKMdUT8w+fw2wimwsEWyVByOM31hsqqVNQIBIwKCAQA6Mq9TZTcIchcsrPt0
-Kd2fFvVfBmi5z3bFF74M/EO1bGcS3RXe2MXhS87lozslbX+k81UdJFMc+HOLUb3i
-Kpmn0cx86hnfn5XYwZRRyp8OlaTmCqUb8TWV24dEiEtZ7LtpNnDi3k8usKUZjztw
-NJXTWVIhNLPqZB6WjbFLTWGUWEEPB5Ft2j0h0gCjcu6rtGWgY2tFjCnb8sQF/GfP
-xAdCy1RAkSucPhfodigzrTWcPfTKsFlSTuAk7mo23EkAISQSUuJMJvEnvZDjt2c3
-Ci8kmZ/duy4DmBC/HPPcjv2LZT8XbCib2I+HABelc6l4SQj2OIvJugWY73Ra4BBg
-mQ4LAoGBANE2J2PRmoCLovteOQW6IgGDPUmowLOrYhIxOub7zDPUS36F82kyvgXO
-N7a+Pz3Y8N/gOlVn2heVLQBdr/d0gELCFBagPZZAvMpTxsIJ4uLdmiBTrobsVFfP
-IzqsyyrPyaLRwbsKCvfFJePC4qavScu7hMd6eq8+0UIugQcTt5wZAoGBAM+0vjPD
-MWIulsArZBIXId/yD4yQf8WN+qwZOwXs+GIKPQckf0anIjl6uLvrAZUxozfzirrv
-0n/RkIvlVmCsUbSAngvzM3riXZfnEepQfmxeZ/yWrUgefHHQzdwMqd0tx7B598t0
-PnnHEknryzFWiBDjKqbUFx1skONRRCraieV9AoGBAI91l1pj16iaQ9+RESh/okou
-G2W1i3PjO+83s1yPZ3P/SbXYMeG8ZQtLk+sGHLyyBEG+U+LK3rEV1bcbq9ziLBCF
-FRbUR3z5MP/Eawi2Um+t5geJ1sLrMoVa1lQetzNMp4WXJcIVg90ZeRE1LbQgbR38
-7VWV0HgrEyYRQoiCjIhLAoGAZOLCyK9D3zszR2WIYI7kkVhQsf0K3ExGjhriJ3MZ
-jrSECsiVl1h+Vm7Owayo/1KfvBc0wTKoEjKWqllzGQM9oNDBy0o9k3VDZwnVgHA9
-Z9YVQCvtw/GM5tMiKQ13E6iFkDs919lgLIVDZbur1iK3HiUx+UJxoJPRWHft6O3N
-8x8CgYEAr7fVluta4hlbdmwSynJ+mOGcOesEURZisYTBV4ffGT7d1bojbT8GtHn9
-xoJ0l9TXjYnFMzEx2qI75AXD4So1VshsNPThMCpYW00posTitDdIdrsZMLffr7ql
-EY+ZJPit72q38GyGokGBSPtmlX2F4C4FUHqzM7ceLeoqpktLljU=
------END RSA PRIVATE KEY-----
-
diff --git a/base/all/root/.ssh/id_rsa.pub b/base/all/root/.ssh/id_rsa.pub
deleted file mode 100644
index 8fae277..0000000
--- a/base/all/root/.ssh/id_rsa.pub
+++ /dev/null
@@ -1 +0,0 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqb5/Xec12KIY7PiIEs9xEAL2VSgGyJ0aaYU/pd/Fe9GB9wTVH02We8fGHcbB19S0S8W4P6nyadSmVlkUflGVfs6UbFV2IZF1DYnwmTmlP98g9Em25tTcSmr1Mo2GcPJ38t7JQF28SC3hioxtXJlfqG8vi4RiFk6ujHKacPcHRgMJVruqaohqXN49Zlb6m2dfM8QkbsPzUDYksUDGXBWrDAQ7ZsTEYZVaWZ5n6qSvZ54hzZy/h71P0nTsuF4tC91LIs6L8Y1Qga3zfa+ZZZRYvBeEhmhqlUxPzVrd/MDA1CNLUApSRNZpgKMdUT8w+fw2wimwsEWyVByOM31hsqqVNQ== root@localhost
diff --git a/base/all/root/scripts/cluster_configure/.gitignore b/base/all/root/scripts/cluster_configure/.gitignore
deleted file mode 100644
index da25447..0000000
--- a/base/all/root/scripts/cluster_configure/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.pyc
-t/
diff --git a/base/all/root/scripts/cluster_configure/README b/base/all/root/scripts/cluster_configure/README
deleted file mode 100644
index caa75e3..0000000
--- a/base/all/root/scripts/cluster_configure/README
+++ /dev/null
@@ -1,168 +0,0 @@
-WHAT?
------
-
-This is a templated-based configuration utility for clusters. It
-allows CTDB and various services (Samba, NFS, vsftpd, ...) to be
-configured. It should be installed/run on each node after relevant
-packages are installed or after any master configuration/template
-change.
-
-WHY?
-----
-
-This is meant to be flexible and allow subsets of services to be
-configured.
-
-HOW?
-----
-
-Run like this to test template expansion into a staging subdirectory
-"t/":
-
- ./cluster-configure.py -vv -n -t templates/rhel -s t example.conf
-
-Or without -n but as root to test actual installation of files and
-reload of services.
-
-Try --help to see the options.
-
-Notes - this sounds complex, but it isn't... see the example
-configuration file and templates. Run the above command with the "-n"
-option and check out the files in the staging area... :-)
-
-* Master configuration file
-
- The master configuration file is parsed by Python's ConfigParser
- module. Therefore, it is subject to any restrictions of that
- module. For example, older versions do not allow identation of
- settings.
-
-* Template structure
-
- Each subdirectory of templates directory is a package name, with a
- 2-digit-plus-dot prefix used to order the processing of packages.
- If, according to the system's package manager, that package is not
- installed on the system then no further processing is done.
-
- A package subdirectory should have one or more version
- subdirectories that are matched to the version of the package
- reported by the package manager. A version subdirectory is named as
- <min>#<max> with a literal '#' as the separator. A missing limit
- implies no limit, so a version subdirectory of "#" matches all
- version. Comparisons with <min> use <= and comparisons with <max>
- use <. This allows simple ranges like "3.0#4.0" to work sensibly
- with "4.0#". The highest matching version is used, so the above
- could just be written "3.0#" and "4.0#".
-
- A "files" subdirectory of a version subdirectory contains a
- directory tree of configuration files that have template
- substitution done and are then installed into the root filesystem.
- A file is only actually installed if, after substitutions, it is
- different to the currently/previously installed file.
-
- An "events" subdirectory of a version subdirectory can contain "pre"
- and "post" files. If any configuration files are (to be) installed
- the "pre" is run before installation of these files and "post" is
- run afterwards.
-
- For example, consider the following:
-
- templates/rhel/60.nfs-utils/1.0#/files/etc/exports
- templates/rhel/60.nfs-utils/1.0#/files/etc/sysconfig/nfs
- templates/rhel/60.nfs-utils/1.0#/events/post
-
- If nfs-utils with a version >= 1.0 is installed then:
-
- 1. Template substitution is done on both files the /etc/exports and
- /etc/sysconfig/nfs files, and each resulting file is installed if
- it is different to the already installed corresponding file.
-
- 2. If a file was installed then "post" is run. This tells NFS to
- reload its configuration.
-
-* Template substitutions
-
- !!variable!!
-
- The template format is !!variable!!. @@variable@@ has been avoided
- so that you can install a configuration and templates with
- autocluster.
-
- !!|expr!!
-
- Apart from simple variables, templates can contain expression
- evaluations. !!|expr!! causes expr to be processed with Python's
- eval() function and the *return value* (not the output) is
- substituted for the template expression.
-
- !!%plugin.func(args)!!
-
- Plugin expressions are an extension to expression evaluations. If a
- plugin called "export.py" contains a function called "format" then a
- template can contain:
-
- !!%export.format(REST)!!
-
- and this will cause the return value the following to be substituted:
-
- export.format(config, self.name, ... REST ...)
-
- where:
-
- - config is the global configuration object
-
- - self.name is the name of the current package being processed
-
- - ... REST ... is usually a printf-style format string followed by a
- list of configuration keys who's values should be substituted into
- the
-
- Note that, for robustness, plugins don't actually get imported into
- the regular namespace so plugin expressions are quite useful... even
- though they might look confusing at first.
-
- An example is illustrative...
-
- Assuming that export.py contains:
-
- def format(config, package, format, items):
- ...
-
- In config (the master configuration file), several exports may be
- defined for the given package. Each will be of the form:
-
- [export:nfs-utils:data]
- share = data
- fsid = 834258092
-
- This will inherit the directory and other options from the share
- "data":
-
- [share:data]
- directory = /srv/xyz123/data
- filesystem = /srv/xyz123
- permissions = 0777
- comment = An example share
-
- To create export defintions for NFS, something like this can be
- used:
-
- !!%export:format("\"%s\" *(rw,fsid=%s)\n", ["directory", "fsid"])!!
-
- This produces a line of output for each export, substituting the
- values for "directory" and "fsid" appropriately. In the above case,
- the output would be:
-
- "/srv/xyz123/data" *(rw,fsid=834258092)
-
-WHERE?
-------
-
-This is part of autocluster, so you can get it from:
-
- git://git.samba.org/autocluster.git
-
-WHO?
-----
-
-Martin Schwenke <martin@meltin.net>
diff --git a/base/all/root/scripts/cluster_configure/TODO b/base/all/root/scripts/cluster_configure/TODO
deleted file mode 100644
index ab81087..0000000
--- a/base/all/root/scripts/cluster_configure/TODO
+++ /dev/null
@@ -1,3 +0,0 @@
-* Integration with CTDB is wonky. cluster_configure probably
- shouldn't restart/reconfigure services itself but should ask CTDB to
- do it.
diff --git a/base/all/root/scripts/cluster_configure/cluster-configure.py b/base/all/root/scripts/cluster_configure/cluster-configure.py
deleted file mode 100755
index e94579e..0000000
--- a/base/all/root/scripts/cluster_configure/cluster-configure.py
+++ /dev/null
@@ -1,452 +0,0 @@
-#!/usr/bin/env python
-
-# Configure clustered Samba nodes
-
-# Copyright (C) Martin Schwenke 2010
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
-import os
-import sys
-import optparse # Newer argparse not yet in RHEL5/EPEL.
-import ConfigParser
-import logging
-import re
-import subprocess
-import errno
-import filecmp
-import shutil
-import glob
-import string
-
-lib_dir = "lib"
-sys.path.append(lib_dir)
-
-import logging
-
-def process_args():
- usage = "usage: %prog [options] configfile"
-
- parser = optparse.OptionParser(usage=usage)
-
- parser.add_option("-t", "--templates",
- action="store", dest="templates",
- default="templates/rhel",
- help="directory containing templates")
- parser.add_option("-f", "--force",
- action="store_true", dest="force",
- default=False,
- help="install configuration files even if unchanged",)
- parser.add_option("-r", "--no-reload",
- action="store_true", dest="no_reload",
- default=False,
- help="""don't run the "reload" script for
-services - this is usually done to make services reload their configuration
-after any changes""")
- parser.add_option("-n", "--simulate",
- action="store_true", dest="simulate",
- default=False,
- help="""don't actually install configuration
-files - this will leave the configuration files in the temporary staging
-area - implies -r""")
- parser.add_option("-s", "--staging",
- action="store", dest="staging",
- default="staging",
- help="directory to stage the files to be installed")
- parser.add_option("-v", "--verbose",
- action="count", dest="verbose",
- default=0,
- help="print information and actions taken to stdout")
- parser.add_option("-l", "--log-file",
- action="store", dest="log_file", default=None,
- metavar="FILE",
- help="append information and actions taken to FILE")
- (options, args) = parser.parse_args()
-
- if len(args) != 1:
- parser.error("configuration file must be specified")
-
- options.config = args[0]
-
- return options
-
-def setup_logging():
-
- global options
-
- logger = logging.getLogger("cluster-configure")
- logger.setLevel(logging.ERROR)
-
- sh = logging.StreamHandler(sys.stderr)
- sh.handleError = lambda x : (logging.shutdown(), sys.exit())
- logger.addHandler(sh)
-
- if options.verbose == 1:
- logger.setLevel(logging.WARNING)
- elif options.verbose == 2:
- logger.setLevel(logging.INFO)
- elif options.verbose >= 3:
- logger.setLevel(logging.DEBUG)
-
- if options.log_file is not None:
- fh = logging.FileHandler(options.log_file)
- # The formatting option %(funcName)s would be useful here but
- # it only appeared in Python 2.5 and this script will be run
- # on Python 2.4.
- formatter = logging.Formatter(
- "%(asctime)s - %(name)s - %(levelname)s - %(message)s")
- fh.setFormatter(formatter)
- logger.addHandler(fh)
-
- return logger
-
-def _rpm_parse_version(v):
- ret = []
- for x in re.split("[^A-Za-z0-9]", v):
- try:
- ret.append(int(x))
- except ValueError:
- ret.append(x)
- return ret
-
-config = None
-options = None
-logger = None
-
-class Package(object):
- def __init__(self, config, directory):
- self.config = config
- self.directory = directory
- self.version = None
- self.platform = None
- self.version_dir = None
- self.files = list()
- self.files_to_install = list()
-
- m = re.match("\d\d\.(.*)", directory)
- if m is None:
- raise RuntimeError, \
- ("invalid template package directory %s" % directory)
- self.name = m.group(1)
- self.stage = os.path.join(options.staging, self.name)
-
- def _get_version(self):
- if os.path.exists("/etc/redhat-release"):
- p = subprocess.Popen(["rpm", "-q", self.name],
- stdout=subprocess.PIPE)
- out = p.communicate()[0]
- status = p.wait()
- if status == 0:
- out.replace(self.name + "-", "")
- self.version = string.strip(out)
- self.platform = "rpm"
- logger.debug("_get_version: package %s has version %s",
- self.name, self.version)
- return True
- elif os.path.exists("/etc/debian_version"):
- p = subprocess.Popen(["dpkg-query", "-W", "-f", "${Version}",
- self.name],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- out = p.communicate()[0]
- status = p.wait()
- if status == 0 and len(out) > 0:
- self.version = string.strip(out)
- self.platform = "deb"
- logger.debug("_get_version: package %s has version %s",
- self.name, self.version)
- return True
-
- logger.info("_get_version: package %s is not installed", self.name)
- return False
-
- # Currently Red Hat specific...
- def _check_version(self, min=None, max=None):
- v = _rpm_parse_version(self.version)
- return min is None or \
- (_rpm_parse_version(min) <= v and \
- (max is None or v < _rpm_parse_version(max)))
-
- def find_version_dir(self):
- if self._get_version():
- pdir = os.path.join(options.templates, self.directory)
- versions = sorted(os.listdir(pdir))
- # FIXME: filter out any without #, since they're meaningless.
- versions.reverse() # bare "#" comes last since it is the default
-
- for i in versions:
- try:
- (min, max) = map(lambda x: len(x) and x or None, i.split("#"))
- except ValueError:
- logger.warn("_find_version_dir: skipping invalid version subdirectory %s" % i)
- continue
-
- if self._check_version(min, max):
- self.version_dir = os.path.join(pdir, i)
- logger.info("_find_version_dir: found version directory %s" % self.version_dir)
- return True
- return False
-
- def _find_template_files(self, fdir):
- """Find the available templates in the given file directory fdir."""
- for (root, dirs, files) in os.walk(fdir):
- for f in files:
- # os.path.relpath is not available in older Python
- frel = os.path.join(root, f).replace(fdir + "/", "", 1)
- logger.debug("_find_template_files: add template file %s" % frel)
- self.files.append(frel)
-
- def _substitute_template(self, contents):
- """Expand the given template fdir/file into the staging area."""
-
- logger.debug("_expand_template: subsitute variables into %s", file)
-
- # Find variables in template and substitute values.
- variables = sorted(set(re.findall("!!((\w+)((=)([^!]*))?)!!",
- contents)))
- # r is the default replacement value for v.
- for (a, v, x, e, r) in variables:
- try:
- r = self.config.get("package:" + self.name, v)
- except (ConfigParser.NoSectionError, ConfigParser.NoOptionError), s:
- # This is the equals sign. if it is there then we have default.
- if e == "":
- raise
-
- contents = contents.replace("!!%s!!" % a, r)
-
- # Find plugin expressions in template and subsitute values.
- exprs = re.findall("!!%([^!]+)!!", contents)
- for e in exprs:
- (m, f, rest) = re.split("[:(]", e, 2)
- foo = 'plugins["%s"].%s(config, "%s", %s' % (m, f, self.name, rest)
- r = eval(foo)
- if r is None:
- return None
- contents = contents.replace("!!%%%s!!" % e, r)
-
- # Find general python expressions in template and subsitute values.
- exprs = re.findall("!!\|([^!]+)!!", contents)
- for e in exprs:
- r = eval(e)
- if r is None:
- return None
- contents = contents.replace("!!|%s!!" % e, r)
-
- return contents
-
- def _expand_template(self, fdir, file):
- """Expand the given template fdir/file into the staging area."""
-
- logger.debug("_expand_template: subsitute variables into %s", file)
-
- # Read input file.
- src = os.path.join(fdir, file)
- f = open(src)
- contents = f.read()
- f.close()
-
- contents = self._substitute_template(contents)
-
- # Ensure output directory exists in staging area.
- dst = os.path.join(self.stage, file)
- try:
- os.makedirs(os.path.dirname(dst))
- except OSError, exc:
- if exc.errno == errno.EEXIST:
- pass
- else: raise
-
- # Write output file into staging area, unless it is None,
- # which means to remove the file if it exists.
- if contents is not None:
- f = open(dst, "w")
- f.write(contents)
- f.close()
- else:
- try:
- os.remove(dst)
- except OSError, exc:
- if exc.errno == errno.ENOENT:
- pass
- else: raise
-
- def _would_install_file(self, file):
- """Check if a file should be installed from the staging area
- because it is different to the currently installed file (or if
- there is no installed file)."""
-
- src = os.path.join(self.stage, file)
- dst = os.path.join("/", file)
-
- if not os.path.exists(src) and not os.path.exists(dst):
- logger.debug("_would_install_file: skip install of %s (missing)", dst)
- return False
-
- try:
- if not options.force and filecmp.cmp(src, dst, shallow=False):
- logger.debug("_would_install_file: skip install of %s (unchanged)", dst)
- return False
- except OSError, exc:
- if exc.errno == errno.ENOENT:
- pass
- else: raise
-
- logger.info("_would_install_file: would install file %s", dst)
- return True
-
- def would_install_files(self):
- """For the templates in our packages files area, expand each
- template into the staging area and check if it would be
- installed due to a change. Return True if any files would be
- installed, False otherwise."""
-
- fdir = os.path.join(self.version_dir, "files")
-
- shutil.rmtree(self.stage, ignore_errors=True)
-
- self._find_template_files(fdir)
- for f in self.files:
- self._expand_template(fdir, f)
-
- for f in self.files:
- if self._would_install_file(f):
- self.files_to_install.append(f)
-
- return self.files_to_install
-
- def _install_file(self, file):
- """Install file from the staging area ."""
-
- src = os.path.join(self.stage, file)
- dst = os.path.join("/", file)
-
- if os.path.exists(src):
- logger.info("_install_file: install file %s", dst)
- shutil.copy2(src, dst)
- else:
- logger.info("_install_file: remove file %s", dst)
- try:
- os.remove(dst)
- except OSError, exc:
- if exc.errno == errno.ENOENT:
- pass
- else: raise
-
- def install_files(self):
- """Install the list of files from self.files_to_install."""
-
- for f in self.files_to_install:
- self._install_file(f)
-
- def run_event(self, event):
- """Run the given event script for the service, if present."""
- es = os.path.join(self.version_dir, "events", event)
- if os.path.exists(es) and os.access(es, os.X_OK):
- p = subprocess.Popen([es],
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- out = p.communicate()[0]
- status = p.wait()
- if status == 0:
- logger.info("_run_event: successfully ran event script %s", es)
- else:
- logger.error("""_run_event: error running event script "%s":
-"%s" """,
- es , string.strip(out))
- else:
- logger.debug("_run_event: no event script %s in %s", event,
- self.version_dir)
-
-
-plugins = {}
-
-def load_plugins():
- global plugins
-
- plugin_dir = "plugins"
-
- sys.path.append(plugin_dir)
- for f in map(lambda x: os.path.splitext(os.path.basename(x))[0],
- glob.glob(os.path.join(plugin_dir, "*.py"))):
-
- plugins[f] = __import__(f)
-
-def ctdb_socket():
-
- ret = os.getenv('CTDB_SOCKET')
-
- if ret is None:
- ctdb = '/usr/bin/ctdb'
- if os.path.exists(ctdb):
- cmd = "strings " + ctdb + " | grep -E '/ctdbd?\.socket$'"
- p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
- out = p.communicate()[0]
- status = p.wait()
- if status == 0:
- ret = string.rstrip(out)
- else:
- logger.warning('Failed to find socket path in "' + ctdb +
- '" - falling back to default')
- else:
- logger.warning('Failed to find "' + ctdb +
- '" - falling back to default')
- if ret is None:
- ret = '/var/run/ctdb/ctdbd.socket'
-
- return ret
-
-def main():
- global config, options, logger
-
- options = process_args()
-
- logger = setup_logging()
-
- load_plugins()
-
- os.environ["PATH"] = os.getcwd() + ":" + os.environ["PATH"]
-
- logger.debug("main: read configuration from %s", options.config)
- config = ConfigParser.SafeConfigParser()
- config.readfp(open(options.config))
-
- # Run the check function in every plugin that defines it.
- config_status = True
- for p in plugins.iterkeys():
- func = getattr(plugins[p], "check", None)
- if callable(func):
- if not func(config):
- config_status = False
- if not config_status:
- logger.error("main: exiting due to previous configuration errors")
- return 1
-
- # Process templates.
- for d in sorted(os.listdir(options.templates)):
- try:
- p = Package(config, d)
- if p.find_version_dir():
- if p.would_install_files() and not options.simulate:
- p.run_event("pre")
- p.install_files()
- p.run_event("post")
- except RuntimeError, s:
- logger.info("main: ignoring %s", s)
-
- logging.shutdown()
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/base/all/root/scripts/cluster_configure/example.conf b/base/all/root/scripts/cluster_configure/example.conf
deleted file mode 100644
index 3bb461e..0000000
--- a/base/all/root/scripts/cluster_configure/example.conf
+++ /dev/null
@@ -1,55 +0,0 @@
-[DEFAULT]
-cluster = foobar
-domain = foobar.local
-chroot_parent = /var/lib/nas-chroot
-scp_chroot = %(chroot_parent)s/scp
-clusterfs_default_mountpoint = /clusterfs
-
-[filesystem:0]
-type = gpfs
-mountpoint = %(clusterfs_default_mountpoint)s
-
-[share:data]
-directory = %(clusterfs_default_mountpoint)s/data
-filesystem = %(clusterfs_default_mountpoint)s
-permissions = 0777
-comment = An example share
-
-[package:ctdb]
-deterministic_ips = 0
-
-[package:vsftpd]
-chroot_dir = %(chroot_parent)s/ftp
-
-[export:vsftpd:data]
-share = data
-
-[package:httpd]
-# This section left intentionally empty.
-
-[export:httpd:data]
-share = data
-
-[package:nfs-utils]
-nfs_hostname = %(cluster)s
-
-[export:nfs-utils:data]
-share = data
-fsid = 834258092
-
-[package:samba]
-workgroup = %(cluster)s
-realm = %(domain)s
-chroot_dir = %(scp_chroot)s
-
-[export:samba:data]
-share = data
-
-[package:openssh-server]
-chroot_dir = %(scp_chroot)s
-
-[export:openssh-server:data]
-share = data
-
-[package:rssh]
-chroot_dir = %(scp_chroot)s
diff --git a/base/all/root/scripts/cluster_configure/lib/util.py b/base/all/root/scripts/cluster_configure/lib/util.py
deleted file mode 100644
index b270c38..0000000
--- a/base/all/root/scripts/cluster_configure/lib/util.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Configure clustered Samba nodes
-
-# Utility functions.
-
-# Copyright (C) Martin Schwenke 2010
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
-def names(config, prefix):
- """Given a config object, return the names sections starting
- with "prefix:" but strip that from each one."""
-
- t = prefix + ":"
-
- return map(lambda y: str.replace(y, t, "", 1),
- filter(lambda x: str.find(x, t) == 0,
- config.sections()))
-
-def retrieve(config, prefix):
- """Given a config, retrieve all the information about shares. The
- result is a dictionary with share names (minus "<prefix>:") as
- keys where each value is a dictionary for the section."""
-
- return dict(map(lambda s: (s, dict(config.items(prefix + ":" + s))),
- names(config, prefix)))
-
diff --git a/base/all/root/scripts/cluster_configure/mkchroot.sh b/base/all/root/scripts/cluster_configure/mkchroot.sh
deleted file mode 100755
index 1f2bb0a..0000000
--- a/base/all/root/scripts/cluster_configure/mkchroot.sh
+++ /dev/null
@@ -1,196 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# Make a simple chroot for vsftpd and scp.
-
-# Note that for the base chroot this attempts to use read-only bind
-# mounts. These will be silently readable on older kernels. If
-# you're using this for anything except simple testing then PLEASE
-# TEST the chroot's security!
-
-usage ()
-{
- cat <<EOF
-usage: $0 { create | destroy } chroot_dir
- $0 mount src_dir dst_dir
- $0 umount dst_dir
-EOF
- exit 1
-}
-
-[ $# -ge 1 ] || usage
-
-action="$1"
-shift
-case "$action" in
- create|destroy|umount)
- :
- ;;
- mount)
- [ $# -ge 2 ] || usage
- ;;
- *)
- usage
-esac
-
-do_mount ()
-{
- _src="$1"
- _dst="$2"
-
- if [ -f "$_dst" ] ; then
- return 0
- fi
-
- if [ -f "$_src" ] ; then
- mkdir -vp $(dirname "$_dst")
- touch "$_dst"
- else
- mkdir -vp "$_dst"
- fi
-
- mount -v --bind "$_src" "$_dst"
-}
-
-do_umount ()
-{
- _dst="$1"
-
- _out=$(awk "\$2 == \"$_dst\" {print \$2}" /proc/mounts)
- if [ -n "$_out" ] ; then
- _is_file=false
- if [ -f "$_dst" ] ; then
- _is_file=true
- fi
- umount -v "$_dst"
- if $_is_file ; then
- rm -vf "$_dst"
- rmdir --ignore-fail-on-non-empty -vp $(dirname "$_dst")
- else
- rmdir --ignore-fail-on-non-empty -vp "$_dst"
- fi
- fi
-}
-
-first_ro_mount=true
-can_remount_ro=true
-
-do_mount_ro ()
-{
- _src="$1"
- _dst="$2"
-
- if [ -f "$_dst" ] ; then
- return 0
- fi
-
- do_mount "$_src" "$_dst"
-
- if $first_ro_mount ; then
- if ! mount -v -o remount,ro "$_dst"; then
- cat <<EOF
-Unable to remount $_dst read-only. Won't try this again.
-
-WARNING: Your chroot may be less secure than you think!
-
-EOF
- can_remount_ro=false
- else
- if f=$(mktemp -p "$_dst" >/dev/null 2>&1) ; then
- rm -f "$f"
- cat <<EOF
-WARNING: Bind mounts don't really look to be read-only!
-EOF
- fi
- fi
- else
- if $can_remount_ro ; then
- mount -v -o remount,ro "$_dst"
- fi
- fi
-
- first_ro_mount=false
-}
-
-sftp_server=""
-for d in /usr/libexec/openssh /usr/lib/openssh ; do
- f="$d/sftp-server"
- if [ -x "$f" ] ; then
- sftp_server="$f"
- break
- fi
-done
-if [ -z "$sftp_server" ] ; then
- echo "$0: error - could not find location of sftp_server"
- exit 2
-fi
-
-case $(uname -m) in
- x86_64)
- lib="lib64"
- ;;
- *)
- lib="lib"
-esac
-
-mounts="\
-/usr/$lib \
-/$lib \
-/etc/nsswitch.conf \
-/etc/resolv.conf \
-$sftp_server \
-/usr/bin/scp \
-"
-
-do_create ()
-{
- chroot_dir="$1"
-
- mkdir -p "$chroot_dir"
-
- fake="${chroot_dir}/.mkchroot"
- touch "$fake"
- ls -l "$fake"
-
- d="$chroot_dir/dev"
- mkdir -vp "$d"
- cp -va /dev/null /dev/zero "$d/"
-
- for s in $mounts ; do
- f="$chroot_dir$s"
- do_mount_ro "$s" "$f"
- done
-
- d="$chroot_dir/etc/passwd"
- touch "$d"
- ls -l "$d"
-}
-
-do_destroy ()
-{
- chroot_dir="$1"
-
- rm -vf "$chroot_dir/etc/passwd"
-
- for i in "null" "zero" ; do
- rm -vf "$chroot_dir/dev/$i"
- done
- rmdir -v "$chroot_dir/dev"
-
- # Reverse the list 1st.
- rmounts=
- for s in $mounts ; do
- rmounts="$s${rmounts:+ }${rmounts}"
- done
-
- for s in $rmounts ; do
- do_umount "${chroot_dir}$s"
- done
-
- fake="${chroot_dir}/.mkchroot"
- rm -vf "$fake"
- rmdir -v "$chroot_dir"
-}
-
-"do_$action" "$@"
diff --git a/base/all/root/scripts/cluster_configure/plugins/ctdb.py b/base/all/root/scripts/cluster_configure/plugins/ctdb.py
deleted file mode 100644
index d326b19..0000000
--- a/base/all/root/scripts/cluster_configure/plugins/ctdb.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Configure clustered Samba nodes
-
-# Module for handling addresses.
-
-# Copyright (C) Amitay Isaacs 2012
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
-import logging
-
-import package
-
-def gen_public_addresses(config, pkg, req_ips):
- """Given a config object, return the formatted public addresses."""
-
- stack = package.get(config, pkg, "network_stack")
- out = []
- out6 = []
- foo = package.get(config, pkg, "public_addresses")
- for tmp in foo.split():
- (startip, num_addrs, iface) = tmp.split(',')
- (a,b,c,d) = startip.split('.')
- for i in xrange(int(num_addrs)):
- octet = int(d) + i
- if stack == 'ipv4' and req_ips == 'default':
- out.append('%s.%s.%s.%d/24 %s\n' % (a, b, c, octet, iface))
- elif stack == 'ipv6' and req_ips == 'default':
- out6.append('fc00:%s:%s:%s::%s/64 %s\n' % (a, b, c, octet, iface))
- elif stack == 'dual':
- if req_ips in ['ipv4', 'dual', 'default']:
- out.append('%s.%s.%s.%d/24 %s\n' % (a, b, c, octet, iface))
- if req_ips in ['ipv6', 'dual', 'default']:
- out6.append('fc00:%s:%s:%s::%s/64 %s\n' % (a, b, c, octet, iface))
-
- # Special case: if the file would be empty then it should be there...
- ret = "".join(out) + "".join(out6)
- if ret:
- return ret
- else:
- return None
diff --git a/base/all/root/scripts/cluster_configure/plugins/export.py b/base/all/root/scripts/cluster_configure/plugins/export.py
deleted file mode 100755
index 63e8b18..0000000
--- a/base/all/root/scripts/cluster_configure/plugins/export.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# Configure clustered Samba nodes
-
-# Module for handling exports.
-
-# Copyright (C) Martin Schwenke 2010
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
-import logging
-
-import util
-import share
-import package
-
-_export_prefix = "export"
-
-def names(config):
- """Given a config, return the names of all exports."""
-
- return util.names(config, _export_prefix)
-
-def retrieve(config, package):
- """Given a config, retrieve all the information about exports for
- package. The result is a dictionary with export names as keys
- where each value is a dictionary for the section."""
-
- return util.retrieve(config, _export_prefix + ":" + package)
-
-def _check(config, package):
- """Given a config sanity check the exports for the package."""
-
- exports = retrieve(config, package)
- shares = share.retrieve(config)
-
- for e in exports.keys():
- s = exports[e].get("share", e)
- if not s in shares:
- raise KeyError, \
- "export:%s:%s requires share:%s" % (package, e, s)
-
-def check(config):
- """Given a config sanity check all of the exports."""
-
- logger = logging.getLogger("cluster-configure")
-
- status = True
-
- for p in package.names(config):
- try:
- _check(config, p)
- except KeyError, str:
- logger.error("configuration error: %s", str)
- status= False
-
- return status
-
-def format(config, package, format, items):
- """Given a config object, return the formatted exports for
- package. Use format string and apply it to the export fields in
- the order specified in items. Before formatting, the dictionary
- for each export is augmented with the options for the
- corresponding share. If there's a collision in an option name
- then it is prefixed with "share:"."""
-
- # Get export and share info.
- exports = retrieve(config, package)
- shares = share.retrieve(config)
-
- out = []
-
- for e in exports.keys():
- # Add name.
- exports[e]["name"] = e
-
- # Add share config.
- s = exports[e].get("share", e)
- for (k,v) in shares[s].iteritems():
- if k in exports[e]:
- exports[e]["share:" + k] = v
- else:
- exports[e][k] = v
-
- def get_val(k):
- ret = exports[e].get(k)
- if ret is None:
- raise ValueError("No option '%s' for package:%s" % (k, package))
- return ret
-
- out.append(format % tuple(map(get_val, items)))
-
- return "".join(out)
diff --git a/base/all/root/scripts/cluster_configure/plugins/package.py b/base/all/root/scripts/cluster_configure/plugins/package.py
deleted file mode 100644
index 179269c..0000000
--- a/base/all/root/scripts/cluster_configure/plugins/package.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# Configure clustered Samba nodes
-
-# Module for handling package configuration.
-
-# Copyright (C) Martin Schwenke 2010
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
-import util
-
-_package_prefix = "package"
-
-def names(config):
- """Given a config, return the names of all packages."""
-
- return util.names(config, _package_prefix)
-
-def get(config, package, key):
- """Given a config, return the the value of specify key
- for the package."""
-
- return config.get(_package_prefix + ":" + package, key)
-
-def retrieve(config, package):
- """Given a config, retrieve all the configuration information
- about package. The result is a dictionary representing the
- package's configuration file section."""
-
- return util.retrieve(config, _package_prefix + ":" + package)
-
diff --git a/base/all/root/scripts/cluster_configure/plugins/share.py b/base/all/root/scripts/cluster_configure/plugins/share.py
deleted file mode 100644
index ae328f8..0000000
--- a/base/all/root/scripts/cluster_configure/plugins/share.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# Configure clustered Samba nodes
-
-# Module for handling shares.
-
-# Copyright (C) Martin Schwenke 2010
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
-import util
-
-_share_prefix = "share"
-
-def names(config):
- """Given a config, return the names of all shares."""
-
- return util.names(config, _share_prefix)
-
-def retrieve(config):
- """Given a config, retrieve all the information about shares. The
- result is a dictionary with share names (minus "share:") as keys
- where each value is a dictionary for the section."""
-
- return util.retrieve(config, _share_prefix)
-
-def format(config, package, format, items):
- """Given a config object, return the formatted shares. Use format
- string and apply it to the share fields in the order specified in
- items. Argument package is ignored but is present for consistency."""
-
- shares = retrieve(config)
-
- out = []
-
- for e in shares.keys():
- # Add name.
- shares[e]["name"] = e
-
- def get_val(k):
- ret = shares[e].get(k)
- if ret is None:
- raise ValueError("No option '%s'" % k)
- return ret
-
- out.append(format % tuple(map(get_val, items)))
-
- return "".join(out)
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/events/post b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/events/post
deleted file mode 100755
index 1777cff..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/events/post
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-set -e
-
-. /etc/sysconfig/ctdb
-if [ -n "$CTDB_RECOVERY_LOCK" ] ; then
- d=$(dirname "$CTDB_RECOVERY_LOCK")
- mkdir -p "$d"
-fi
-
-exec service ctdb restart
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses
deleted file mode 100644
index e2053a7..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses
+++ /dev/null
@@ -1 +0,0 @@
-!!%ctdb:gen_public_addresses('default')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.dual b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.dual
deleted file mode 100644
index 9aecdac..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.dual
+++ /dev/null
@@ -1 +0,0 @@
-!!%ctdb:gen_public_addresses('dual')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.ipv4 b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.ipv4
deleted file mode 100644
index 3ab0921..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.ipv4
+++ /dev/null
@@ -1 +0,0 @@
-!!%ctdb:gen_public_addresses('ipv4')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.ipv6 b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.ipv6
deleted file mode 100644
index 4a67496..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/ctdb/public_addresses.ipv6
+++ /dev/null
@@ -1 +0,0 @@
-!!%ctdb:gen_public_addresses('ipv6')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/sysconfig/ctdb b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/sysconfig/ctdb
deleted file mode 100644
index 0b01efa..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/files/etc/sysconfig/ctdb
+++ /dev/null
@@ -1,20 +0,0 @@
-# Core
-CTDB_PUBLIC_ADDRESSES=/etc/ctdb/public_addresses
-CTDB_RECOVERY_LOCK=@@CLUSTERFS_DEFAULT_MOUNTPOINT@@/.ctdb/recovery.lock
-
-# Services managed
-CTDB_MANAGES_SAMBA=yes
-CTDB_MANAGES_WINBIND=!!|"yes" if self.config.get("package:ctdb", "auth_method") == "winbind" else "no"!!
-CTDB_MANAGES_NFS=yes
-CTDB_MANAGES_HTTPD=yes
-CTDB_MANAGES_VSFTPD=yes
-
-# System
-ulimit -n 1048576
-DAEMON_COREFILE_LIMIT="unlimited"
-
-# Logging
-CTDB_LOGGING="syslog"
-CTDB_SYSLOG="yes" # backward compatibility
-CTDB_DEBUGLEVEL=NOTICE
-CTDB_LOG_RINGBUF_SIZE=500000
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/events/post b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/events/post
deleted file mode 100755
index 1777cff..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/events/post
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-set -e
-
-. /etc/sysconfig/ctdb
-if [ -n "$CTDB_RECOVERY_LOCK" ] ; then
- d=$(dirname "$CTDB_RECOVERY_LOCK")
- mkdir -p "$d"
-fi
-
-exec service ctdb restart
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/ctdb.conf b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/ctdb.conf
deleted file mode 100644
index 159df0f..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/ctdb.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-[logging]
- location = syslog
- log level = NOTICE
-
-[cluster]
- recovery lock = @@CLUSTERFS_DEFAULT_MOUNTPOINT@@/.ctdb/recovery.lock
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses
deleted file mode 100644
index e2053a7..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses
+++ /dev/null
@@ -1 +0,0 @@
-!!%ctdb:gen_public_addresses('default')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.dual b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.dual
deleted file mode 100644
index 9aecdac..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.dual
+++ /dev/null
@@ -1 +0,0 @@
-!!%ctdb:gen_public_addresses('dual')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv4 b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv4
deleted file mode 100644
index 3ab0921..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv4
+++ /dev/null
@@ -1 +0,0 @@
-!!%ctdb:gen_public_addresses('ipv4')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv6 b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv6
deleted file mode 100644
index 4a67496..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv6
+++ /dev/null
@@ -1 +0,0 @@
-!!%ctdb:gen_public_addresses('ipv6')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/script.options b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/script.options
deleted file mode 100644
index 092c53d..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/script.options
+++ /dev/null
@@ -1,8 +0,0 @@
-# These could be in per-event-script files but this is more convenient
-# for now
-
-CTDB_MANAGES_SAMBA=yes
-CTDB_MANAGES_WINBIND=!!|"yes" if self.config.get("package:ctdb", "auth_method") == "winbind" else "no"!!
-CTDB_MANAGES_NFS=yes
-CTDB_MANAGES_HTTPD=yes
-CTDB_MANAGES_VSFTPD=yes
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/sysconfig/ctdb b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/sysconfig/ctdb
deleted file mode 100644
index 384cdd1..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/sysconfig/ctdb
+++ /dev/null
@@ -1,20 +0,0 @@
-# Core
-CTDB_PUBLIC_ADDRESSES=/etc/ctdb/public_addresses
-CTDB_RECOVERY_LOCK=@@CLUSTERFS_DEFAULT_MOUNTPOINT@@/.ctdb/recovery.lock
-
-# Services managed
-CTDB_MANAGES_SAMBA=yes
-CTDB_MANAGES_WINBIND=!!|"yes" if self.config.get("package:ctdb", "auth_method") == "winbind" else "no"!!
-CTDB_MANAGES_NFS=yes
-CTDB_MANAGES_HTTPD=yes
-CTDB_MANAGES_VSFTPD=yes
-
-# System
-ulimit -n 1048576
-ulimit -c unlimited
-
-# Logging
-CTDB_LOGGING="syslog"
-CTDB_SYSLOG="yes" # backward compatibility
-CTDB_DEBUGLEVEL=NOTICE
-CTDB_LOG_RINGBUF_SIZE=500000
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/01.gpfs.base/3.3#/events/post b/base/all/root/scripts/cluster_configure/templates/rhel/01.gpfs.base/3.3#/events/post
deleted file mode 100755
index 2ddc918..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/01.gpfs.base/3.3#/events/post
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-. /etc/sysconfig/gpfs
-
-for i in $GPFS_SHARES ; do
- d="${i%:*}"
- p="${i#*:}"
-
- mkdir -p "$d"
- chmod "$p" "$d"
-done
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/01.gpfs.base/3.3#/files/etc/sysconfig/gpfs b/base/all/root/scripts/cluster_configure/templates/rhel/01.gpfs.base/3.3#/files/etc/sysconfig/gpfs
deleted file mode 100644
index 20ced8b..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/01.gpfs.base/3.3#/files/etc/sysconfig/gpfs
+++ /dev/null
@@ -1 +0,0 @@
-GPFS_SHARES='!!%share:format("%s:%s ", ["directory", "permissions"])!!'
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/events/post b/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/events/post
deleted file mode 100755
index e7ae37c..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/events/post
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-set -e
-
-. /etc/vsftpd/vsftpd.conf
-. /etc/sysconfig/vsftpd
-
-mkdir -p "$local_root"
-
-export_dir="${local_root}/exports"
-
-for i in $FTP_EXPORTS ; do
- e="${i%:*}"
- s="${i#*:}"
- d="${export_dir}/${e}"
- if [ ! -d "$d" ] ; then
- mkchroot.sh mount "$s" "$d"
- fi
-done
-
-service vsftpd start
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/events/pre b/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/events/pre
deleted file mode 100755
index 60acf05..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/events/pre
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if service vsftpd status ; then
- service vsftpd stop
-fi
-
-. /etc/vsftpd/vsftpd.conf
-. /etc/sysconfig/vsftpd
-
-export_dir="${local_root}/exports"
-
-for i in $FTP_EXPORTS ; do
- e="${i%:*}"
- d="${export_dir}/${e}"
- if [ -d "$d" ] ; then
- mkchroot.sh umount "$d" || true
- fi
-done
-
-rmdir -p "$local_root"
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/pam.d/vsftpd b/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/pam.d/vsftpd
deleted file mode 100644
index 8abc181..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/pam.d/vsftpd
+++ /dev/null
@@ -1,10 +0,0 @@
-#%PAM-1.0
-session optional pam_keyinit.so force revoke
-auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
-#auth required pam_shells.so
-!!|"" if self.config.get("package:vsftpd", "auth_method") == "winbind" else "#"!!auth sufficient pam_winbind.so
-auth include system-auth
-!!|"" if self.config.get("package:vsftpd", "auth_method") == "winbind" else "#"!!account sufficient pam_winbind.so
-account include system-auth
-session include system-auth
-session required pam_loginuid.so
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/sysconfig/vsftpd b/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/sysconfig/vsftpd
deleted file mode 100644
index 38e33a1..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/sysconfig/vsftpd
+++ /dev/null
@@ -1 +0,0 @@
-FTP_EXPORTS='!!%export:format("%s:%s ", ["name", "directory"])!!'
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/vsftpd/vsftpd.conf b/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/vsftpd/vsftpd.conf
deleted file mode 100644
index abfb4bf..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/40.vsftpd/2.0#/files/etc/vsftpd/vsftpd.conf
+++ /dev/null
@@ -1,22 +0,0 @@
-# no anon access
-anonymous_enable=NO
-# put locks onto the files currently transferred
-lock_upload_files=YES
-# enable write access
-write_enable=YES
-# prevent changing access rights – ACLs get screwed otherwise
-chmod_enable=NO
-# enable that user is able to see the root of gpfs
-chroot_local_user=YES
-# allow local user access
-local_enable=YES
-listen=YES
-pam_service_name=vsftpd
-# set the ftp root directory users can see when they connect to the FTP
-local_root=!!chroot_dir!!
-log_ftp_protocol=YES
-syslog_enable=YES
-#show user/groupnames instead of only numeric IDs
-text_userdb_names=YES
-# make vsftpd work
-connect_from_port_20=YES
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/41.httpd/2.2#/events/post b/base/all/root/scripts/cluster_configure/templates/rhel/41.httpd/2.2#/events/post
deleted file mode 100755
index 060b997..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/41.httpd/2.2#/events/post
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec service httpd reload
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/41.httpd/2.2#/files/etc/httpd/conf.d/shares.config b/base/all/root/scripts/cluster_configure/templates/rhel/41.httpd/2.2#/files/etc/httpd/conf.d/shares.config
deleted file mode 100644
index 2c3907b..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/41.httpd/2.2#/files/etc/httpd/conf.d/shares.config
+++ /dev/null
@@ -1 +0,0 @@
-!!%export:format("ScriptAlias \"/%s\" \"/var/www/cgi-bin/browse.cgi\"\nRewriteRule ^/%s(/(.*)$|$) - [E=CGIBROWSE_PREFIX:%s]\n", ("name", "name", "directory"))!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/42.rssh/2.3.2#/files/etc/rssh.conf b/base/all/root/scripts/cluster_configure/templates/rhel/42.rssh/2.3.2#/files/etc/rssh.conf
deleted file mode 100644
index 4ad7e95..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/42.rssh/2.3.2#/files/etc/rssh.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-allowscp
-allowsftp
-chrootpath=!!chroot_dir!!
-logfacility=LOG_USER
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/events/post b/base/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/events/post
deleted file mode 100755
index f34dd56..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/events/post
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-set -e
-
-. /etc/sysconfig/sshd
-
-if [ ! -d "$SCP_CHROOT" ] ; then
- mkchroot.sh create "$SCP_CHROOT"
-fi
-
-export_dir="${SCP_CHROOT}/exports"
-
-for i in $FTP_EXPORTS ; do
- b=$(basename "$i")
- d="${export_dir}/${b}"
- if [ -d "$d" ] ; then
- mkchroot.sh mount "$i" "$d"
- fi
-done
-
-service sshd start
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/events/pre b/base/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/events/pre
deleted file mode 100755
index 7b89c97..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/events/pre
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if service sshd status ; then
- service sshd stop
-fi
-
-. /etc/sysconfig/sshd
-
-export_dir="${SCP_CHROOT}/exports"
-
-for i in $SCP_EXPORTS ; do
- b=$(basename "$i")
- d="${export_dir}/${b}"
- if [ -d "$d" ] ; then
- mkchroot.sh umount "$d"
- fi
-done
-
-if [ -d "$SCP_CHROOT" ] ; then
- mkchroot.sh destroy "$SCP_CHROOT"
-fi
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/files/etc/sysconfig/sshd b/base/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/files/etc/sysconfig/sshd
deleted file mode 100644
index 40c8dd9..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/43.openssh-server/4.3#/files/etc/sysconfig/sshd
+++ /dev/null
@@ -1,2 +0,0 @@
-SCP_CHROOT=!!chroot_dir!!
-SCP_EXPORTS='!!%export:format("%s ", ["directory"])!!'
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/50.samba/3.4#/files/etc/samba/smb.conf b/base/all/root/scripts/cluster_configure/templates/rhel/50.samba/3.4#/files/etc/samba/smb.conf
deleted file mode 100644
index 4f8f8d0..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/50.samba/3.4#/files/etc/samba/smb.conf
+++ /dev/null
@@ -1,53 +0,0 @@
-[global]
- # enable clustering
- clustering=yes
- ctdb:registry.tdb=yes
- ctdbd socket = !!|ctdb_socket()!!
-
- security = !!|"ADS" if self.config.get("package:samba", "auth_method") == "winbind" else "USER"!!
- auth methods = guest sam !!|"winbind" if self.config.get("package:samba", "auth_method") == "winbind" else ""!!
-
- netbios name = !!cluster!!
- workgroup = !!workgroup!!
- realm = !!realm!!
- server string = "Clustered Samba"
- disable netbios = yes
- disable spoolss = yes
- fileid:mapping = fsname
- use mmap = yes
- gpfs:sharemodes = yes
- gpfs:leases = yes
- passdb backend = tdbsam
- preferred master = no
- !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!idmap backend = tdb2
- !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!idmap:cache = no
- !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!idmap gid = 10000000-11000000
- !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!idmap uid = 10000000-11000000
- kernel oplocks = yes
- syslog = 1
- host msdfs = no
- notify:inotify = no
- vfs objects = shadow_copy2 syncops gpfs fileid
- shadow:snapdir = .snapshots
- shadow:fixinodes = yes
- wide links = no
- smbd:backgroundqueue = False
- read only = no
- use sendfile = yes
- strict locking = yes
- posix locking = yes
- large readwrite = yes
- force unknown acl user = yes
- nfs4:mode = special
- nfs4:chown = yes
- nfs4:acedup = merge
- nfs4:sidmap = /etc/samba/sidmap.tdb
- map readonly = no
- ea support = yes
- !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!groupdb:backend = tdb
- !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!winbind:online check timeout = 30
- !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!template shell = /usr/bin/rssh
- !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!template homedir = !!chroot_dir!!
- dmapi support = no
-
-!!%export:format("[%s]\n\tpath = %s\n\tcomment = %s\n\tguest ok = yes\n\tread only = no\n\tbrowseable = yes\n\n", ["name", "directory", "comment"])!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/events/post b/base/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/events/post
deleted file mode 100755
index 371fcfd..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/events/post
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec service nfs reload
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/files/etc/exports b/base/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/files/etc/exports
deleted file mode 100644
index 8f5822b..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/files/etc/exports
+++ /dev/null
@@ -1 +0,0 @@
-!!%export:format("\"%s\" *(rw,no_root_squash,subtree_check,fsid=%s)\n", ["directory", "fsid"])!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/files/etc/sysconfig/nfs b/base/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/files/etc/sysconfig/nfs
deleted file mode 100644
index dce3ce7..0000000
--- a/base/all/root/scripts/cluster_configure/templates/rhel/60.nfs-utils/1.0#/files/etc/sysconfig/nfs
+++ /dev/null
@@ -1,9 +0,0 @@
-STATD_PORT=32765
-STATD_OUTGOING_PORT=32766
-MOUNTD_PORT=32767
-RQUOTAD_PORT=32768
-LOCKD_UDPPORT=32769
-LOCKD_TCPPORT=32769
-NFS_HOSTNAME="!!nfs_hostname!!"
-STATD_HOSTNAME="$NFS_HOSTNAME -H /etc/ctdb/statd-callout "
-RPCNFSDARGS="-N 4"
diff --git a/base/all/root/scripts/cluster_setup.sh b/base/all/root/scripts/cluster_setup.sh
deleted file mode 100755
index 6a32c13..0000000
--- a/base/all/root/scripts/cluster_setup.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-
-#config: CLUSTERFS_TYPE
-
-set -e
-
-stage="$1" ; shift
-
-prefix="$stage"
-case "$stage" in
- install_packages)
- prefix="install"
- # Always do the extra packages task
- set -- "extra_packages" "$@"
- ;;
-esac
-
-dn=$(dirname $0)
-
-config="${dn}/cluster_setup.config"
-if [ ! -r "$config" ] ; then
- echo "Can not local configuration file \"${config}\""
-fi
-. "$config"
-
-for task ; do
- case "$task" in
- clusterfs)
- type="$CLUSTERFS_TYPE"
- file="${prefix%_clusterfs}_clusterfs_${type}.sh"
- ;;
- *)
- file="${prefix}_${task}.sh"
- esac
-
- path="${dn}/tasks/${file}"
-
- if [ ! -r "$path" ] ; then
- echo "Unable to find script \"${file}\" for stage \"${stage}\" task \"${task}\""
- exit 1
- fi
-
- echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
- printf "%% %-66s %%\n" "Stage \"${stage}\", task \"${task}\" on host ${HOSTNAME%%.*}"
- echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
- set -- # pass no arguments
- . "$path"
-done
diff --git a/base/all/root/scripts/nas.conf b/base/all/root/scripts/nas.conf
deleted file mode 100644
index d3bef51..0000000
--- a/base/all/root/scripts/nas.conf
+++ /dev/null
@@ -1,59 +0,0 @@
-[DEFAULT]
-cluster = @@CLUSTER@@
-domain = @@DOMAIN@@
-workgroup = @@WORKGROUP@@
-kdc = @@KDC_NAME@@
-chroot_parent = /var/lib/nas-chroot
-scp_chroot = %(chroot_parent)s/scp
-clusterfs_default_mountpoint = @@CLUSTERFS_DEFAULT_MOUNTPOINT@@
-auth_method = @@AUTH_METHOD@@
-network_stack = @@NETWORK_STACK@@
-
-[filesystem:0]
-type = @@CLUSTERFS_TYPE@@
-mountpoint = %(clusterfs_default_mountpoint)s
-
-[share:data]
-directory = %(clusterfs_default_mountpoint)s/data
-filesystem = %(clusterfs_default_mountpoint)s
-permissions = 0777
-comment = An example share
-
-[package:ctdb]
-deterministic_ips = 0
-public_addresses = @@@PUBLIC_ADDRESSES@@@
-
-[package:vsftpd]
-chroot_dir = %(chroot_parent)s/ftp
-
-[export:vsftpd:data]
-share = data
-
-[package:httpd]
-# This section left intentionally empty.
-
-[export:httpd:data]
-share = data
-
-[package:nfs-utils]
-nfs_hostname = %(cluster)s
-
-[export:nfs-utils:data]
-share = data
-fsid = 834258092
-
-[package:samba]
-realm = %(domain)s
-chroot_dir = %(scp_chroot)s
-
-[export:samba:data]
-share = data
-
-[package:openssh-server]
-chroot_dir = %(scp_chroot)s
-
-[export:openssh-server:data]
-share = data
-
-[package:rssh]
-chroot_dir = %(scp_chroot)s
diff --git a/base/all/root/scripts/setup_segv_handler.sh b/base/all/root/scripts/setup_segv_handler.sh
deleted file mode 100755
index 763f22d..0000000
--- a/base/all/root/scripts/setup_segv_handler.sh
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/bash
-# a script to setup a segmentation fault handler on a SoFS cluster
-# tridge@samba.org July 2008
-
-set -e
-
-echo "Creating source file"
-mkdir -p /usr/local/src
-
-cat <<EOFSOURCE > /usr/local/src/segv_handler.c
-#define _GNU_SOURCE
-#include <signal.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <dlfcn.h>
-
-static int segv_handler(int sig)
-{
- char cmd[100];
- char progname[100];
- char *p;
- int n;
-
- n = readlink("/proc/self/exe",progname,sizeof(progname));
- progname[n] = 0;
-
- p = strrchr(progname, '/');
- *p = 0;
-
- snprintf(cmd, sizeof(cmd), "/usr/local/bin/backtrace %d 2>&1 | tee /var/log/segv/segv_%s.%d.out > /dev/console",
- (int)getpid(), p+1, (int)getpid());
- system(cmd);
- signal(SIGSEGV, SIG_DFL);
- return 0;
-}
-
-static void segv_init() __attribute__((constructor));
-void segv_init(void)
-{
- signal(SIGSEGV, (sighandler_t) segv_handler);
- signal(SIGBUS, (sighandler_t) segv_handler);
-}
-EOFSOURCE
-
-mkdir -p /usr/local/bin
-cat <<EOFSOURCE > /usr/local/bin/backtrace
-#!/bin/sh
-
-# we want everything on stderr, so the program is not disturbed
-exec 1>&2
-
-PID=\$1
-TMPFILE=/tmp/gdb.\$\$
-cat << EOF > \$TMPFILE
-set height 0
-bt full
-thread apply all bt full
-quit
-EOF
-gdb -batch -x \$TMPFILE --pid \$PID < /dev/null
-/bin/rm -f \$TMPFILE
-
-EOFSOURCE
-
-chmod +x /usr/local/bin/backtrace
-
-mkdir -p /var/log/segv
-
-echo "Compiling 64 bit shared library"
-mkdir -p /usr/local/lib
-gcc -m64 -shared -fPIC -o /usr/local/lib/segv_handler64.so /usr/local/src/segv_handler.c
-
-echo "Compiling 32 bit shared library"
-mkdir -p /usr/local/lib
-gcc -m32 -shared -fPIC -o /usr/local/lib/segv_handler32.so /usr/local/src/segv_handler.c
-
-echo "Modifying /lib/ld-2.5.so for LD_PRELO32"
-sed -e 's@/etc/ld.so.preload@/etc/ld.so.prelo32@g' -i.orig /lib/ld-2.5.so
-# we need to remove the original to stop ldconfig enabling it
-rm -f /lib/ld-2.5.so.orig
-
-echo "Creating /etc/ld.so.prelo32"
-echo "/usr/local/lib/segv_handler32.so" > /etc/ld.so.prelo32
-
-echo "Creating /etc/ld.so.preload"
-echo "/usr/local/lib/segv_handler64.so" >> /etc/ld.so.preload
-sort -u < /etc/ld.so.preload > /etc/ld.so.preload.$$
-mv /etc/ld.so.preload.$$ /etc/ld.so.preload
-
-echo "Copying install to other nodes"
-onnode -p all rsync $HOSTNAME:/usr/local/bin/backtrace /usr/local/bin/
-onnode -p all rsync $HOSTNAME:/usr/local/lib/segv_handler*so /usr/local/lib
-onnode -p all rsync $HOSTNAME:/etc/ld.so.preload /etc/
-onnode -p all rsync $HOSTNAME:/etc/ld.so.prelo32 /etc/
-onnode -p all rsync $HOSTNAME:/lib/ld-2.5.so /lib/
-onnode -p all mkdir -p /var/log/segv
-onnode -p all chmod a+rwx /var/log/segv
-
-cat <<EOF
-segv_handler installed. To take full effect you must restart your daemons
-or reboot
-EOF
diff --git a/base/all/root/scripts/setup_tsm_client.sh b/base/all/root/scripts/setup_tsm_client.sh
deleted file mode 100755
index 792edbe..0000000
--- a/base/all/root/scripts/setup_tsm_client.sh
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/bin/bash
-
-# catch errors
-set -e
-set -E
-trap 'es=$?;
- echo ERROR: failed in function \"${FUNCNAME}\" at line ${LINENO} of ${BASH_SOURCE[0]} with code $es;
- exit $es' ERR
-
-# Setup things up so that TSM_SERVER is the first tsm_server node and
-# any nas nodes are listed in the TSM server configuration as clients.
-NODES="@@NODES@@"
-TSM_SERVER=""
-TSM_CLIENTS=""
-
-for n in $NODES ; do
- case "$n" in
- nas:*)
- t="${n%:*}"
- # comma separated
- TSM_CLIENTS="${TSM_CLIENTS}${TSM_CLIENTS:+,}${t##*:}"
- ;;
- tsm_server:*)
- [ -n "$TSM_SERVER" ] && continue
- t="${n%:*}"
- TSM_SERVER="${t##*:}"
- esac
-done
-
-if [ -z "$TSM_SERVER" ] ; then
- echo "ERROR: No tsm_server nodes in this cluster!"
- exit 1
-fi
-
-################################
-
-mmgetstate | grep active > /dev/null || {
- echo "GPFS must be running to setup TSM client"
- exit 1
-}
-
-################################
-# wait for GPFS to become active
-gpfs_wait_active() {
- echo "Waiting for gpfs to become active"
- while ! mmgetstate | grep active > /dev/null; do
- echo -n ".";
- sleep 1;
- done
- echo
-}
-
-########################
-# wait for GPFS to mount
-gpfs_wait_mount() {
- gpfs_wait_active
- echo "Waiting for gpfs to mount (can take a while)"
- while ! mount | grep /dev/gpfs0 > /dev/null; do
- sleep 2;
- mmmount gpfs0 -a 2> /dev/null || true
- done
-}
-
-
-######################################
-# run the given command on all of the $TSM_CLIENTS
-run_on_client_nodes() {
- onnode -n -qp "$TSM_CLIENTS" "$@"
-}
-
-# install the SoFS toolset first so that gpfsready is put into place
-# and the HSM packages will not touch it any more
-run_on_client_nodes yum -y install sofs-toolset
-run_on_client_nodes yum -y install TIVsm-BA TIVsm-HSM TIVsm-API expect
-
-echo "Setting up dsm.sys"
-cat <<EOF > /opt/tivoli/tsm/client/ba/bin/dsm.sys
-SErvername $TSM_SERVER
- COMMMethod TCPip
- TCPPort 1500
- TCPServeraddress $TSM_SERVER
- PASSWORDACCESS generate
- EXCLUDE.DIR /.../.snapshots
- EXCLUDE /.../.snapshots/*
- EXCLUDE.DIR /.../.SpaceMan
- EXCLUDE /.../.SpaceMan/*
- EXCLUDE.DIR /.../.ctdb
- EXCLUDE /.../.ctdb/*
- ERRORLOGName /var/log/dsmerror.log
- ASNODENAME @@TSMNAME@@
-EOF
-run_on_client_nodes rsync $HOSTNAME:/opt/tivoli/tsm/client/ba/bin/dsm.sys /opt/tivoli/tsm/client/ba/bin
-
-echo "Setting up dsm.opt"
-cat <<EOF > /opt/tivoli/tsm/client/ba/bin/dsm.opt
-servername $TSM_SERVER
-dateformat 2
-EOF
-run_on_client_nodes rsync $HOSTNAME:/opt/tivoli/tsm/client/ba/bin/dsm.opt /opt/tivoli/tsm/client/ba/bin
-
-run_on_client_nodes "preprpnode `hostname -s`"
-mkrpdomain -F /etc/ctdb/nodes SoFS
-
-echo "Setting TSM password"
-cat <<EOF > /tmp/tsmpwd
-spawn dsmsetpw
-expect "enter password"
-send "admin
-"
-sleep 2
-EOF
-run_on_client_nodes "rsync $HOSTNAME:/tmp/tsmpwd /tmp/; expect /tmp/tsmpwd"
-run_on_client_nodes rm -f /tmp/tsmpwd
-
-# we have to use a rather torturous procedure ...
-echo "Killing ctdb"
-run_on_client_nodes killall ctdbd || true
-
-echo "temporarily disabling automount of gpfs0"
-mmchfs gpfs0 -A no
-
-echo "Shutting down gpfs"
-mmshutdown -a
-
-echo "Starting up gpfs again"
-mmstartup -a
-
-gpfs_wait_active
-
-echo "Enabling DMAPI in gpfs"
-mmchfs gpfs0 -z yes
-
-echo "Enabling LOWSPACE events in GPFS"
-mmchconfig enableLowspaceEvents=yes
-
-echo "enabling automount of gpfs0"
-mmchfs gpfs0 -A yes
-
-echo "Restarting GPFS"
-mmshutdown -a
-mmstartup -a
-
-gpfs_wait_mount
-
-echo "Adding space management to /gpfs"
-dsmmigfs add /gpfs -LT=100 -HT=100
-
-echo "Enabling failover"
-run_on_client_nodes dsmmigfs ENABLEFailover
-
-echo "Restarting gpfs"
-mmshutdown -a
-mmstartup -a
-
-gpfs_wait_mount
-
-cat <<EOF
-TSM client setup complete on $TSM_CLIENTS
-You should reboot the nodes before using HSM
-EOF
diff --git a/base/all/root/scripts/setup_tsm_server.sh b/base/all/root/scripts/setup_tsm_server.sh
deleted file mode 100755
index 30bd92e..0000000
--- a/base/all/root/scripts/setup_tsm_server.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# catch errors
-set -e
-set -E
-trap 'es=$?;
- echo ERROR: failed in function \"${FUNCNAME}\" at line ${LINENO} of ${BASH_SOURCE[0]} with code $es;
- exit $es' ERR
-
-
-# Setup things up so that TSM_SERVER is the first tsm_server node and
-# any nas nodes are listed in the TSM server configuration as
-# clients.
-NODES="@@NODES@@"
-TSM_SERVER=""
-TSM_CLIENTS=""
-
-for n in $NODES ; do
- case "$n" in
- nas:*)
- t="${n%:*}"
- TSM_CLIENTS="${TSM_CLIENTS}${TSM_CLIENTS:+ }${t##*:}"
- ;;
- tsm_server:*)
- [ -n "$TSM_SERVER" ] && continue
- t="${n%:*}"
- TSM_SERVER="${t##*:}"
- esac
-done
-
-if [ -z "$TSM_SERVER" ] ; then
- echo "ERROR: No tsm_server nodes in this cluster!"
- exit 1
-fi
-
-if [ -z "$TSM_CLIENTS" ] ; then
- echo "ERROR: No nas nodes in this cluster!"
- exit 1
-fi
-
-yum -y install TIVsm-BA TIVsm-HSM TIVsm-API TIVsm-server
-
-echo "Ensuring multipath is disabled on this disk"
-chkconfig multipathd off || true
-service multipathd stop || true
-multipath -F || true
-cat <<EOF >> /etc/multipath.conf
-blacklist {
- "^@@SYSTEM_DISK_PREFIX@@b"
-}
-EOF
-
-echo "Disabling multipath at boot"
-sed -e 's/rhgb/rhgb nompath/g' -i.orig /boot/grub/grub.conf
-
-mkfs.ext3 -F /dev/@@SYSTEM_DISK_PREFIX@@b
-mkdir -p /tsmdiskpool
-cat <<EOF >> /etc/fstab
-/dev/@@SYSTEM_DISK_PREFIX@@b /tsmdiskpool ext3 defaults 1 1
-EOF
-mount /tsmdiskpool
-
-ln -sf /opt/tivoli/tsm/server/bin/dsmserv.rc /etc/init.d/dsmserv
-ln -sf /etc/init.d/dsmserv /etc/rc3.d/S99dsmserv
-/etc/init.d/dsmserv start
-
-echo "Setting up dsm.sys"
-cat <<EOF > /opt/tivoli/tsm/client/ba/bin/dsm.sys
-SErvername $TSM_SERVER
- COMMMethod TCPip
- TCPPort 1500
- TCPServeraddress $TSM_SERVER
- ASNODENAME @@TSMNAME@@
- PASSWORDACCESS generate
- EXCLUDE.DIR /.../.snapshots
- ERRORLOGName /var/log/dsmerror.log
-EOF
-
-echo "Setting up dsm.opt"
-cat <<EOF > /opt/tivoli/tsm/client/ba/bin/dsm.opt
-servername $TSM_SERVER
-dateformat 2
-EOF
-
-
-
-{
- cat <<EOF
-copy domain STANDARD ALLTODISK
-upd mg ALLTODISK STANDARD STANDARD migrequiresbkup=no SPACEMGTECHnique=selective
-activate pol ALLTODISK STANDARD
-register node @@TSMNAME@@ admin domain=ALLTODISK userid=none backdel=yes
-EOF
-
- AGENTS=""
- for c in $TSM_CLIENTS ; do
- echo "register node ${c}.@@DOMAIN@@ admin domain=ALLTODISK userid=none backdel=yes"
- AGENTS="${AGENTS}${AGENTS:+,}${c}.@@DOMAIN@@"
- done
-
- cat <<EOF
-grant proxynode target=@@TSMNAME@@ agent=$AGENTS
-def dbvol /tsmdiskpool/db1.dsm format=@@TSM_DB_SIZE@@ wait=yes
-del dbv /opt/tivoli/tsm/server/bin/db.dsm wait=yes
-extend db `expr @@TSM_DB_SIZE@@ - 16` wait=yes
-set logmode rollf
-def vol spacemgpool /tsmdiskpool/vol01.dsm format=@@TSM_SPACE_MGMT_SIZE@@ wait=yes
-def vol backuppool /tsmdiskpool/backup1.dsm format=@@TSM_BACKUP_POOL_SIZE@@ wait=yes
-del vol /opt/tivoli/tsm/server/bin/backup.dsm wait=yes
-def vol archivepool /tsmdiskpool/archive1.dsm format=@@TSM_ARCHIVE_POOL_SIZE@@ wait=yes
-del vol /opt/tivoli/tsm/server/bin/archive.dsm wait=yes
-upd stgpool archivepool next=spacemgpool
-upd stgpool backuppool next=spacemgpool
-EOF
-} | dsmadmc -id=admin -password=admin -noconfirm || true
-
-echo "TSM server setup complete"
-exit 0
diff --git a/base/all/root/scripts/tasks/install_ad.sh b/base/all/root/scripts/tasks/install_ad.sh
deleted file mode 100755
index 5560d35..0000000
--- a/base/all/root/scripts/tasks/install_ad.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-set -e
-
-echo "Installing Samba4 packages"
-yum -y install samba4-dc samba4-python samba4-winbind
diff --git a/base/all/root/scripts/tasks/install_build.sh b/base/all/root/scripts/tasks/install_build.sh
deleted file mode 100755
index cc67d58..0000000
--- a/base/all/root/scripts/tasks/install_build.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# Setup RPM development
-echo "Installing RPM developing and setting up rpm build"
-yum -y install rpmdevtools
-
-# Install the performance co-pilot packages to allow building of the
-# CTDB pmda code. It is OK if this fails (these packages are only
-# available in EPEL) since this script will continue...
-echo "Installing PCP development libraries - this may fail"
-yum -y install pcp-libs pcp-libs-devel || true
-
-# Packages required for samba development
-echo "Installing Samba build dependencies"
-yum -y install readline-devel libacl-devel e2fsprogs-devel \
- libxslt docbook-utils docbook-style-xsl dbus-devel \
- libaio-devel libcap-devel quota-devel \
- perl-Parse-Yapp perl-ExtUtils-MakeMaker
-
-exit 0
diff --git a/base/all/root/scripts/tasks/install_clusterfs_gpfs.sh b/base/all/root/scripts/tasks/install_clusterfs_gpfs.sh
deleted file mode 100755
index f12473d..0000000
--- a/base/all/root/scripts/tasks/install_clusterfs_gpfs.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-#config: GPFS_BASE_VERSION RHEL_ARCH
-
-# Must force the base GPFS package first, due to the way GPFS updates
-# work.
-echo "Installing GPFS base"
-yum -y install "gpfs.base-${GPFS_BASE_VERSION}.${RHEL_ARCH}"
-
-echo "Updating GPFS base"
-yum -y update
-
-echo "Installing remaining GPFS packages"
-yum -y install gpfs.docs gpfs.gpl gpfs.msg.en_US gpfs.gskit
-
-echo "Adding GPFS's bin to PATH"
-cat >/etc/profile.d/gpfs-autocluster.sh <<EOF
-# Added by autocluster
-pathmunge /usr/lpp/mmfs/bin
-EOF
-
-echo "Rebuilding the GPFS modules"
-(cd /usr/lpp/mmfs/src && make Autoconfig World InstallImages)
diff --git a/base/all/root/scripts/tasks/install_extra_packages.sh b/base/all/root/scripts/tasks/install_extra_packages.sh
deleted file mode 100755
index 39140da..0000000
--- a/base/all/root/scripts/tasks/install_extra_packages.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-#config: CONFIG_EXTRA_PACKAGES
-
-echo "Updating from YUM repositories"
-yum -y update
-
-extra_packages="$CONFIG_EXTRA_PACKAGES"
-if [ -n "$extra_packages" ] ; then
- echo "Installing extra packages"
- yum -y install $extra_packages
-fi
diff --git a/base/all/root/scripts/tasks/install_nas.sh b/base/all/root/scripts/tasks/install_nas.sh
deleted file mode 100755
index 30210cc..0000000
--- a/base/all/root/scripts/tasks/install_nas.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-echo "Installing tdb tools packages"
-yum -y install tdb-tools
-
-echo "Installing ctdb packages"
-yum -y install ctdb ctdb-debuginfo ctdb-devel ctdb-tests
-
-echo "Installing samba packages"
-yum -y install \
- samba samba-client samba-doc \
- samba-winbind samba-winbind-clients
-yum -y install samba-vfs-gpfs || true
-
-echo "Installing rssh"
-yum -y install rssh
diff --git a/base/all/root/scripts/tasks/setup_cluster_nas.sh b/base/all/root/scripts/tasks/setup_cluster_nas.sh
deleted file mode 100755
index d584e5a..0000000
--- a/base/all/root/scripts/tasks/setup_cluster_nas.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-
-#config: AD_ADMIN_PASS
-
-# Configure a simple NAS cluster as generated by autocluster..
-
-set -e
-
-conf_file="/root/scripts/nas.conf"
-
-ad_admin_pass="$AD_ADMIN_PASS"
-domain_auth="administrator${ad_admin_pass:+%}${ad_admin_pass}"
-
-wait_until_healthy ()
-{
- local timeout="${1:-120}"
-
- echo -n "Wait until healthy [<${timeout}] "
-
- local count=0
- while [ $count -lt $timeout ] ; do
- if ctdb nodestatus all >/dev/null ; then
- echo "[${count}]"
- return 0
- fi
- echo -n "."
- count=$(($count + 1))
- sleep 1
- done
-
- echo "[TIMEOUT]"
- return 1
-}
-
-auth_type=$(sed -r -n -e 's@^auth_method[[:space:]]*=[[:space:]]*(files|winbind)[[:space:]]*$@\1@p' "$conf_file")
-
-case "$auth_type" in
- winbind)
- echo "Joining domain"
- for i in $(seq 1 5) ; do
- status=0
- timeout 10 net ads join -U"$domain_auth" || status=$?
- echo " status = $status"
- if [ $status -eq 0 ] ; then
- break
- fi
- sleep 1
- done
- ;;
-esac
-
-echo "Restarting ctdb (up to 5 times)"
-# Just in case the cluster doesn't become healthy the first time,
-# repeat a few times...
-for i in $(seq 1 5) ; do
- onnode -p all "service ctdb restart"
- if wait_until_healthy ; then
- echo "NAS cluster setup complete"
- exit 0
- fi
-done
-
-exit 1
diff --git a/base/all/root/scripts/tasks/setup_clusterfs_gpfs.sh b/base/all/root/scripts/tasks/setup_clusterfs_gpfs.sh
deleted file mode 100755
index 8cf5e9b..0000000
--- a/base/all/root/scripts/tasks/setup_clusterfs_gpfs.sh
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/bin/sh
-
-#config: CLUSTER CLUSTERFS_DEFAULT_MOUNTPOINT GPFS_DEFAULT_NSDS
-#config: NODES_STORAGE_GPFS SHARED_DISK_IDS
-
-# Automatically setup GPFS. This is a quick way to get setup with an
-# autocluster system. It finds NSDs, does various pieces of GPFS
-# configuration, creates a filesystem and mounts it.
-
-set -e
-
-gpfs_num_nsds="$GPFS_DEFAULT_NSDS"
-cluster_name="$CLUSTER"
-mountpoint="$CLUSTERFS_DEFAULT_MOUNTPOINT"
-nodes_storage_gpfs="$NODES_STORAGE_GPFS"
-shared_disk_ids="$SHARED_DISK_IDS"
-
-dir=$(dirname "$0")
-
-##################################################
-
-# If there are "storage_gpfs" nodes in the cluster (meaning that "nas"
-# nodes will not have direct-attached storage) then scripts that
-# include this snippet must be run on one of the storage nodes.
-# Therefore, in the case, this snippet tries to determine if it is
-# running on the 1st GPFS storage node and, if not, attempts to run
-# the script there.
-if [ -n "$nodes_storage_gpfs" -a \
- "${HOSTNAME%%.*}" != "${nodes_storage_gpfs%%[.,]*}" ] ; then
- if [ "${0#/}" != "$0" ] ; then
- script="$0"
- else
- script="${PWD}/${0}"
- fi
- re_exec_node="${nodes_storage_gpfs%%[.,]*}"
- echo
- echo "Creating NSDs on node \"${re_exec_node}\""
- exec ssh "$re_exec_node" "$script" "$@"
-fi
-
-##################################################
-
-# Uses: cluster_name
-gpfs_setup ()
-{
- _domain=$(dnsdomainname)
- _nodes=$(onnode -q all hostname | grep -i "$_domain" | tr 'A-Z\012' 'a-z\040')
-
- _first="${_nodes%% *}"
-
- # Determine primary and secondary nodes. Give preference to GPFS
- # storage nodes, falling back to regular nodes if there aren't any
- # or aren't enough.
- if [ -n "$nodes_storage_gpfs" ] ; then
- _primary="${nodes_storage_gpfs%%,*}"
- _rest="${nodes_storage_gpfs#*,}"
- _secondary="${_rest%%,*}"
- fi
- if [ -z "$_primary" ] ; then
- _primary="$_first"
- _rest="${_nodes#* }"
- _secondary="${_rest%% *}"
- elif [ -z "$_secondary" ] ; then
- _secondary="$_first"
- fi
-
- # Create the node description file for mmcrcluster. If there are
- # dedicated storage nodes then they are quorum nodes, along with
- # the first node. If there are no dedicated storage nodes then
- # all nodes are quorum nodes.
- _nodefile="${dir}/gpfs_nodes.${cluster_name}"
- {
- for _n in $_nodes ; do
- if [ "$_n" = "$_first" ] ; then
- echo "${_n}:manager-quorum:"
- elif [ -n "$nodes_storage_gpfs" ] ; then
- echo "${_n}:manager:"
- else
- echo "${_n}:manager-quorum:"
- fi
- done
- for _n in $(echo "$nodes_storage_gpfs" | sed -e 's@,@ @g') ; do
- echo "${_n}:manager-quorum:"
- done
- } >"$_nodefile"
-
- echo "Creating cluster"
- # Don't quote secondary, since it might not exist
- mmcrcluster -N "$_nodefile" \
- -p "$_primary" ${_secondary:+-s} $_secondary \
- -r /usr/bin/ssh -R /usr/bin/scp -C "${cluster_name}.${_domain}"
-
- # GPFS >= 3.3 needs this. Earlier versions don't have
- # mmchlicense, so be careful.
- if type mmchlicense >/dev/null 2>&1 ; then
- echo
- echo "Attempting to set server license mode for all nodes"
- mmchlicense server --accept -N all
- fi
-
- echo
- echo "Attempting to set adminMode=allToAll"
- mmchconfig adminMode=allToAll </dev/null || true
-
- echo
- echo "Generating auth key"
- mmauth genkey new
-
- echo
- echo "Setting GPFS config options"
- mmchconfig autoload=yes,leaseRecoveryWait=3,maxFilesToCache=20000,failureDetectionTime=10,maxMBpS=500,unmountOnDiskFail=yes,pagepool=64M,allowSambaCaseInsensitiveLookup=no
- mmchconfig cipherList=AUTHONLY
-
- echo "Starting gpfs"
- mmstartup -a
-
- echo "Waiting for gpfs to become active"
- _count=0
- while mmgetstate -a | tail -n +4 | grep -v " active" > /dev/null; do
- echo -n "."
- _count=$(($_count + 1))
- if [ $_count -gt 60 ] ; then
- echo "TIMEOUT: gpfs didn't become active"
- exit 1
- fi
- sleep 1
- done
- echo
-}
-
-nsdfile="${dir}/gpfs_nsds_all.${cluster_name}"
-
-# Uses: nodes_storage_gpfs
-# Sets: nsdfile
-gpfs_mknsd ()
-{
- echo
- echo "Setting up NSDs"
-
- # Create an extended regexp that matches any of the IDs
- pat=$(echo "$shared_disk_ids" | sed -e 's@ *@|@g')
-
- # Now get devices and names from multipath
- multipath -dl |
- sed -r -n -e "s@^[^[:space:]]+[[:space:]]+\(($pat)\)[[:space:]](dm-[^[:space:]]+).*@\1 \2@p" |
- while read _name _disk ; do
- _name=$(echo "$_name" | tr -d -c '[:alnum:]')
- echo "${_disk}:${nodes_storage_gpfs}::dataAndMetadata:1:${_name}:"
- done >"$nsdfile"
-
- mmcrnsd -F "$nsdfile"
- mmlsnsd -m
-}
-
-# Uses: mountpoint, gpfs_num_nsds, nsdfile
-gpfs_mkfs ()
-{
- echo
- echo "Creating filesystem"
-
- if [ ! -r "$nsdfile" ] ; then
- echo "ERROR: missing NSD file \"${nsdfile}\""
- exit 1
- fi
-
- mkdir -p "${mountpoint}/automountdir"
-
- nsdfile2="${dir}/gpfs_nsds_defaultfs.${cluster_name}"
- if [ -n "$gpfs_num_nsds" ] ; then
- head -n $(($gpfs_num_nsds * 2))
- else
- cat
- fi <"$nsdfile" >"$nsdfile2"
-
- chattr +i "$mountpoint"
-
- mmcrfs gpfs0 -F "$nsdfile2" \
- -A yes -Q yes -D nfs4 -B 64k -k nfs4 -n 32 -E yes -S no \
- -T "$mountpoint" -i 512
-
- rm -f "$nsdfile2"
-}
-
-gpfs_mount ()
-{
- echo
- echo "Mounting filesystem"
- mmmount gpfs0 -a
-
- echo "Waiting for gpfs to mount"
- while ! findmnt "$mountpoint" ; do
- echo -n "."
- sleep 1
- done
-
- echo
-}
-
-gpfs_complete ()
-{
- echo "GPFS setup complete"
-}
-
-[ -n "$1" ] || set -- setup mknsd mkfs mount complete
-
-for action ; do
- gpfs_$action
-done
diff --git a/base/all/root/scripts/tasks/setup_node_ad.sh b/base/all/root/scripts/tasks/setup_node_ad.sh
deleted file mode 100755
index a3855ad..0000000
--- a/base/all/root/scripts/tasks/setup_node_ad.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-
-#config: AD_ADMIN_PASS AD_DNS_FORWARDER AD_FUNCTION_LEVEL AD_NETBIOS_NAME
-#config: DOMAIN IPNUM NETWORK_PRIVATE_PREFIX WORKGROUP
-
-set -e
-
-# Remove samba3 configuration file
-rm -f /etc/samba/smb.conf
-
-# Create AD instance
-echo "Provisioning Samba4 AD domain: ${DOMAIN}"
-hostip="${NETWORK_PRIVATE_PREFIX}.${IPNUM}"
-samba-tool domain provision \
- --realm="$DOMAIN" \
- --domain="$WORKGROUP" \
- --host-ip="$hostip" \
- --host-name="$AD_NETBIOS_NAME" \
- --server-role="domain controller" \
- --function-level="$AD_FUNCTION_LEVEL" \
- --dns-backend="SAMBA_INTERNAL"
-
-# Add samba configuration parameters
-sed -i -e '/server services/a\
- allow dns updates = True\
- nsupdate command = nsupdate\
- dns forwarder = ${AD_DNS_FORWARDER}\
- dns recursive queries = Yes' /etc/samba/smb.conf
-
-# Add users/groups
-echo "Adding users and groups"
-samba-tool domain passwordsettings set --min-pwd-length=3
-samba-tool domain passwordsettings set --complexity=off
-samba-tool user setexpiry --noexpiry Administrator
-samba-tool user setpassword administrator --newpassword="$AD_ADMIN_PASS"
-samba-tool group add group1
-samba-tool group add group2
-samba-tool user add user1 "$AD_ADMIN_PASS"
-samba-tool group addmembers group1 user1
-samba-tool user setexpiry --noexpiry user1
-samba-tool user add user2 "$AD_ADMIN_PASS"
-samba-tool group addmembers group2 user2
-samba-tool user setexpiry --noexpiry user2
-
-# Samba start-up
-cat >> /etc/rc.d/rc.local <<EOF
-
-# Start SAMBA AD server
-/usr/sbin/samba
-EOF
-mkdir /var/run/samba
-
-# Add NetBIOS name to hosts
-echo "${hostip} ${AD_NETBIOS_NAME}.${DOMAIN} ${AD_NETBIOS_NAME}" >>/etc/hosts
-
-# Update DNS configuration
-echo "Updating /etc/resolv.conf"
-sed -i -e 's@^\(nameserver.*\)@#\1@' /etc/resolv.conf
-echo "nameserver $hostip" >> /etc/resolv.conf
-
-# Start SAMBA
-/usr/sbin/samba
diff --git a/base/all/root/scripts/tasks/setup_node_build.sh b/base/all/root/scripts/tasks/setup_node_build.sh
deleted file mode 100755
index 04d18b6..0000000
--- a/base/all/root/scripts/tasks/setup_node_build.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-echo "Running rpmdev-setuptree"
-rpmdev-setuptree
-
-echo "Removing .rpmmacros"
-rm -vf /root/.rpmmacros
diff --git a/base/all/root/scripts/tasks/setup_node_nas.sh b/base/all/root/scripts/tasks/setup_node_nas.sh
deleted file mode 100755
index 65fd966..0000000
--- a/base/all/root/scripts/tasks/setup_node_nas.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-# Per-node NAS cluster configuration steps
-
-set -e
-
-conf_file="/root/scripts/nas.conf"
-
-auth_type=$(sed -r -n -e 's@^auth_method[[:space:]]*=[[:space:]]*(files|winbind)[[:space:]]*$@\1@p' "$conf_file")
-
-case "$auth_type" in
- winbind|files) : ;;
- *)
- echo "Unsupported authentication type \"${auth_type}\""
- usage
-esac
-
-domain=$(sed -r -n -e 's@^domain[[:space:]]*=[[:space:]]*([^ ]*)[[:space:]]*$@\1@p' "$conf_file" | tr '[a-z]' '[A-Z]')
-
-kdc=$(sed -r -n -e 's@^kdc[[:space:]]*=[[:space:]]*([^ ]*)[[:space:]]*$@\1@p' "$conf_file")
-
-case "$auth_type" in
- winbind)
- echo "Setting up NSS, PAM, KRB5..."
- authconfig --update --nostart \
- --enablewinbindauth --enablewinbind \
- --disablekrb5 --krb5kdc=$kdc.$domain --krb5realm=$domain
- ;;
- files)
- echo "Setting up NSS, PAM, KRB5..."
- authconfig --update --nostart \
- --disablewinbindauth --disablewinbind \
- --disablekrb5 --krb5kdc=$kdc.$domain --krb5realm=$domain
- ;;
-esac
-
-echo "Configuring services..."
-(cd scripts/cluster_configure && \
- ./cluster-configure.py -t "templates/rhel/" -vv "$conf_file")
diff --git a/base/all/sbin/scsi_id_autocluster.sh b/base/all/sbin/scsi_id_autocluster.sh
deleted file mode 100755
index d1293a2..0000000
--- a/base/all/sbin/scsi_id_autocluster.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-# get scsi ID assuming disks setup by autocluster
-/bin/dd if=/dev/$1 bs=1 count=64 2>/dev/null | head -n 1 | cat -v
diff --git a/base/rhel_base/etc/hosts b/base/rhel_base/etc/hosts
deleted file mode 100644
index 4d7acd6..0000000
--- a/base/rhel_base/etc/hosts
+++ /dev/null
@@ -1,5 +0,0 @@
-127.0.0.1 localhost
-
-@@@HOSTS_STATIC_ENTRIES@@@
-
-@@KVMHOST@@ kvmhost