mirror of
https://github.com/schoebel/mars
synced 2024-12-12 09:45:41 +00:00
86 lines
3.0 KiB
Bash
86 lines
3.0 KiB
Bash
#!/bin/bash
|
|
# Copyright 2010-2013 Frank Liepold / 1&1 Internet AG
|
|
#
|
|
# Copying and distribution of this file, with or without modification,
|
|
# are permitted in any medium without royalty provided the copyright
|
|
# notice and this notice are preserved. This file is offered as-is,
|
|
# without any warranty.
|
|
|
|
#####################################################################
|
|
|
|
## defaults for module install_mars
|
|
##
|
|
## installs the mars module on given hosts.
|
|
## root access without password request to each host is required.
|
|
|
|
## enable_install_mars
|
|
|
|
## Set to 0 or 1. Enable / disable this module.
|
|
|
|
enable_install_mars=0
|
|
|
|
## install_mars_target_host_list
|
|
##
|
|
## list of hostnames where to install mars
|
|
|
|
install_mars_target_host_list[0]="no_target_hosts_given"
|
|
|
|
## install_mars_target_host_bootloader_list
|
|
##
|
|
## to prepare a target host for reboot. Corresponds to
|
|
## install_mars_target_host_list
|
|
|
|
install_mars_target_host_bootloader_list[0]="no_bootloader_given"
|
|
|
|
## install_mars_target_host_bootloader_label_list
|
|
##
|
|
## to prepare a target host for reboot. Contains the labels used by the specific
|
|
## bootloader to boot a given kernel. Corresponds to
|
|
## install_mars_target_host_list and install_mars_target_host_bootloader_list
|
|
|
|
install_mars_target_host_bootloader_label_list[0]="no_bootloader_label_given"
|
|
|
|
## install_mars_method_list
|
|
##
|
|
## array containing provided methods to install mars on a given host.
|
|
##
|
|
## the variable install_mars_method contains the currently chosen method.
|
|
|
|
declare -A -g install_mars_method_list
|
|
|
|
install_mars_method_list["kernel_and_modules_via_sync_from_host_to_host"]=1
|
|
install_mars_method="no_install_method_given"
|
|
|
|
## method kernel_and_modules_via_sync_from_host_to_host
|
|
##
|
|
## installs kernel and mars module from given (source) host on the target hosts
|
|
##
|
|
## it is assumed that the kernel and the corresponding moduls could be
|
|
## identified on the source host by a string (e.g. 3.2.41-generic). This
|
|
## string is saved in the variable install_mars_kernel_release
|
|
## it will be checked that there are the following files and directories:
|
|
##
|
|
## /boot/vmlinuz-<kernel name>
|
|
## /boot/System.map-<kernel name>
|
|
## /boot/config-<kernel name>
|
|
## /boot/initrd.img-<kernel name>
|
|
## /lib/modules/<kernel name>
|
|
##
|
|
## userspace tools (see install_mars_userspace_src_file_list are copied to
|
|
## directories install_mars_userspace_target_dir_list on every target host
|
|
|
|
install_mars_source_host="no_source_host_given"
|
|
install_mars_kernel_release="no_kernel_release_given"
|
|
# to get the complete filenames the string :kernel_release: is replaced by the
|
|
# value of install_mars_kernel_release in the following list
|
|
install_mars_files_to_sync_list=( /boot/vmlinuz-:kernel: \
|
|
/boot/System.map-:kernel: \
|
|
/boot/config-:kernel: \
|
|
/boot/initrd.img-:kernel: \
|
|
/lib/modules/:kernel: )
|
|
|
|
# each index in the following lists is the name of a file which must be copied
|
|
# to the specified directory on the target host
|
|
declare -g -A install_mars_userspace_target_dir_list
|
|
|