diff options
author | Christian Rößler | 2018-04-16 14:17:05 +0200 |
---|---|---|
committer | Christian Rößler | 2018-04-16 14:17:05 +0200 |
commit | 4ced5000dc8199b0085ae2c0c9c538e45b19ccf2 (patch) | |
tree | 19a1d2ec7fcfcf3fea3a9d9fbbe5669d7f8e5a95 | |
parent | Revert "[SSUS] updater.template.sh: Check for major version (Deb.) accepts 9" (diff) | |
download | setup-scripts-4ced5000dc8199b0085ae2c0c9c538e45b19ccf2.tar.gz setup-scripts-4ced5000dc8199b0085ae2c0c9c538e45b19ccf2.tar.xz setup-scripts-4ced5000dc8199b0085ae2c0c9c538e45b19ccf2.zip |
[SPSS] dnbd3 server added
-rw-r--r-- | satellit_installer/includes/00-dirs.inc | 3 | ||||
-rw-r--r-- | satellit_installer/includes/00-variables.inc | 12 | ||||
-rw-r--r-- | satellit_installer/includes/10-handle_users.inc | 2 | ||||
-rw-r--r-- | satellit_installer/includes/50-add_users_groups.inc | 2 | ||||
-rw-r--r-- | satellit_installer/includes/50-install_dnbd3-server.inc | 29 | ||||
-rwxr-xr-x | satellit_installer/satellit_installer | 2 |
6 files changed, 43 insertions, 7 deletions
diff --git a/satellit_installer/includes/00-dirs.inc b/satellit_installer/includes/00-dirs.inc index f5a052f..cd6d383 100644 --- a/satellit_installer/includes/00-dirs.inc +++ b/satellit_installer/includes/00-dirs.inc @@ -1,6 +1,7 @@ # Do not rename this file, it is copied later on by the script dropper export CONFIGDIR="$BASEDIR/config" export DMSDDIR="/opt/dmsd/" +export DNBD3DIR="/opt/openslx/dnbd3/" export TASKMANDIR="/opt/taskmanager/" export OPENSLXDIR="/opt/openslx/" export OPENSLXSRVDIR="/srv/openslx/" @@ -10,5 +11,5 @@ export WWWDIR="$OPENSLXSRVDIR/www" export PATH_SLXADMIN="$WWWDIR/slx-admin" export IPXEDIR="$OPENSLXDIR/ipxe" export SLXADMINCACHE="/var/cache/slx-admin" -readonly CONFIGDIR DMSDDIR TASKMANDIR OPENSLXDIR OPENSLXSRVDIR LDADPDIR SYNCDAEMONDIR TFTPDIR WWWDIR PATH_SLXADMIN +readonly CONFIGDIR DMSDDIR DNBD3DIR TASKMANDIR OPENSLXDIR OPENSLXSRVDIR LDADPDIR SYNCDAEMONDIR TFTPDIR WWWDIR PATH_SLXADMIN diff --git a/satellit_installer/includes/00-variables.inc b/satellit_installer/includes/00-variables.inc index 9df6a4e..d336c1d 100644 --- a/satellit_installer/includes/00-variables.inc +++ b/satellit_installer/includes/00-variables.inc @@ -26,6 +26,7 @@ PACKAGELIST_SERVER=" sudo php-common php-mysqlnd php-cli nfs-kernel-server curl nfs-common libowfat0 ldap-utils vim gcc make unattended-upgrades gnupg libowfat-dev libssl-dev gcc make liblzma-dev tmate php-xml net-tools + libjansson4 " # Enter here packages needing installation of recommended packages as determines by apt-get: @@ -36,13 +37,14 @@ PACKAGELIST_WITH_RECOMMENDS=" ### http for static files: HTTP_BASE="http://files.bwlp.ks.uni-freiburg.de/install/" -HTTP_FILES="dmsd.jar openslx_tftp.tar.gz" +HTTP_FILES="dmsd.jar dnbd3-server openslx_tftp.tar.gz" HTTP_FILES+=" taskmanager.tar.gz db_sat_dump.sql" HTTP_FILES+=" slx-admin.tar.gz syslinux6.tar.gz syslinux4.tar.gz" ### slxadmin module list: which modules from modules-available will be (symbolically) linked: -SLXADMIN_MODULES="adduser backup baseconfig baseconfig_bwidm baseconfig_bwlp bootstrap_datepicker bootstrap_dialog" -SLXADMIN_MODULES+=" bootstrap_timepicker bootstrap_multiselect bootstrap_switch dozmod eventlog exams js_chart js_circles" -SLXADMIN_MODULES+=" js_jqueryui js_moment js_selectize js_stupidtable js_vis locationinfo locations main minilinux news" -SLXADMIN_MODULES+=" serversetup-bwlp rebootcontrol roomplanner session statistics statistics_reporting summernote sysconfig" +SLXADMIN_MODULES="adduser backup baseconfig baseconfig_bwidm baseconfig_bwlp bootstrap_datepicker bootstrap_dialog bootstrap_timepicker" +SLXADMIN_MODULES+=" bootstrap_multiselect bootstrap_switch dnbd3 dozmod eventlog exams js_chart js_circles js_jqueryui js_moment" +SLXADMIN_MODULES+=" js_selectize js_stupidtable js_vis locationinfo js_weekcalendar locationinfo locations main minilinux news" +SLXADMIN_MODULES+=" serversetup-bwlp rebootcontrol roomplanner runmode session statistics statistics_reporting summernote sysconfig" SLXADMIN_MODULES+=" syslog systemstatus vmstore webinterface" + diff --git a/satellit_installer/includes/10-handle_users.inc b/satellit_installer/includes/10-handle_users.inc index 34dc71b..d0dab50 100644 --- a/satellit_installer/includes/10-handle_users.inc +++ b/satellit_installer/includes/10-handle_users.inc @@ -20,7 +20,7 @@ add_user() { add_user_nohome() { echo -n "# Adding homeless user: $1, uid $2, to gid $3..." - useradd -u "$2" --no-create-home --shell /bin/false -g "$3" "$1" 2>/dev/null \ + useradd -u "$2" --no-create-home -d /nonexistent --shell /bin/false -g "$3" "$1" 2>/dev/null \ || perror "Could not add homeless user ${1}/${2} / gid $3!" echo " ok." } diff --git a/satellit_installer/includes/50-add_users_groups.inc b/satellit_installer/includes/50-add_users_groups.inc index d50472f..79f0424 100644 --- a/satellit_installer/includes/50-add_users_groups.inc +++ b/satellit_installer/includes/50-add_users_groups.inc @@ -3,6 +3,7 @@ add_users_groups() { add_group taskmanager 1001 add_group ldadp 1002 add_group vmware 1003 + add_group dnbd3 10002 add_group images 12345 # add_user: $1 username, $2 num. uid, $3 prim. (num.) gid, ($4 optional, other group) @@ -11,5 +12,6 @@ add_users_groups() { add_user ldadp 1002 1002 add_user_nohome vmware 1003 1003 add_user dmsd 10001 12345 12345 + add_user_nohome dnbd3 10002 10002 adduser www-data adm # So the webif can read /var/log stuff } diff --git a/satellit_installer/includes/50-install_dnbd3-server.inc b/satellit_installer/includes/50-install_dnbd3-server.inc new file mode 100644 index 0000000..ef0aafd --- /dev/null +++ b/satellit_installer/includes/50-install_dnbd3-server.inc @@ -0,0 +1,29 @@ +install_dnbd3-server_service() { + echo -n " copying dnbd3-server service file... " + cp -p "$BASEDIR/static_files/dnbd3-server.service" /etc/systemd/system && echo "ok." || perror "failed." + echo -n "# Linking dnbd3-server service file into (/etc/systemd/system/)multi-user.target.wants... " + ln -s /etc/systemd/system/dnbd3-server.service /etc/systemd/system/multi-user.target.wants/dnbd3-server.service \ + && echo "ok." || perror "Could not link dnbd3-server service file into multiuser target!" +} + +install_dnbd3-server() { + # $1: directory to install dnbd3-server to + echo -n "# Installing dnbd3 server... " + mkdir -p "$1" 2>/dev/null + for i in dnbd3-server is-enabled; do + cp "$BASEDIR/static_files/$i" "$1" + chmod +x "$1/$i" + done + chown -R root:root "$1" + + + mkdir -p /etc/dnbd3-server 2>/dev/null + for i in rpc.acl server.conf; do + cp "$BASEDIR/static_files/$i" /etc/dnbd3-server/ + chmod 644 "/etc/dnbd3-server/$i" + done + + install_dnbd3-server_service "/etc/systemd/system/" + echo "# dnbd3-server ok." +} + diff --git a/satellit_installer/satellit_installer b/satellit_installer/satellit_installer index 28312f7..260ec4b 100755 --- a/satellit_installer/satellit_installer +++ b/satellit_installer/satellit_installer @@ -136,6 +136,8 @@ write_apt_config install_bwSuite_server "$DMSDDIR" +install_dnbd3-server "DNBD3DIR" + install_taskmanager "$TASKMANDIR" install_ipxe "$IPXEDIR" |