mirror of https://github.com/schoebel/mars
65 lines
2.4 KiB
Bash
65 lines
2.4 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_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
|
|
|