From 71ae1aa13ccfe40b1e1283ebf5fe10ce1b316abf Mon Sep 17 00:00:00 2001 From: torben Date: Tue, 1 Mar 2016 16:24:26 +0100 Subject: Improve shell config. --- builder/dnbd3-rootfs/module-setup.sh | 45 ++++++++---------------------------- 1 file changed, 9 insertions(+), 36 deletions(-) (limited to 'builder/dnbd3-rootfs/module-setup.sh') diff --git a/builder/dnbd3-rootfs/module-setup.sh b/builder/dnbd3-rootfs/module-setup.sh index cad97776..2b821255 100755 --- a/builder/dnbd3-rootfs/module-setup.sh +++ b/builder/dnbd3-rootfs/module-setup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source "$(dirname "${BASH_SOURCE[0]}")/scripts/rebash/core.sh" core.import exceptions @@ -123,7 +123,6 @@ installkernel() { install() { # region binaries - inst "$moddir/binaries/dnbd3/build/dnbd3-client" /usr/bin/dnbd3-client inst "$moddir/binaries/systemd-preserve-process-marker/systemd-preserve-process-marker" \ /usr/bin/systemd-preserve-process-marker @@ -139,21 +138,16 @@ install() { done inst "$moddir/binaries/qemu-xmount/libxmount_input_qemu.so" \ /usr/lib/xmount/libxmount_input_qemu.so - # endregion - # region hooks - inst_hook cmdline 00 "$moddir/hooks/enable-sysrq.sh" inst_hook cmdline 10 "$moddir/hooks/prepare-kernel-command-line-parameter.sh" inst_hook cmdline 90 "$moddir/hooks/set-dracut-environment-variables.sh" - # load dnbd3.ko inst_hook pre-udev 00 "$moddir/hooks/load-custom-kernel-modules.sh" # get the openslx config from the servers configured in the kernel command # line (${SLX_SERVER}/${SLX_SERVER_BASE}/config) inst_hook pre-mount 00 "$moddir/hooks/fetch-config.sh" - # make the final blockdevice for the root system (dnbd3 -> xmount -> # device-mapper) if dracut_module_included "systemd-initrd"; then @@ -177,61 +171,40 @@ install() { else inst_hook pre-mount 10 "$moddir/hooks/prepare-root-partition.sh" fi - inst_hook mount 10 "$moddir/hooks/mount-root-device.sh" - inst_hook pre-pivot 00 "$moddir/hooks/copy-openslx-configuration-into-newroot.sh" #inst_hook pre-pivot 00 "$moddir/hooks/mount-tmp.sh" - # endregion - # region scripts - local file_path for file_path in "$moddir/scripts/rebash/"*; do inst "$file_path" "/usr/lib/rebash/$(basename "$file_path")" done inst "$moddir/scripts/tools.sh" "/usr/lib/openslx/tools.sh" - # endregion - # region configuration files - # Use terminal readline settings from the template system. inst /etc/inputrc /etc/inputrc # Set some aliases for the initramfs context. if [[ "$_debug" == 0 ]]; then inst "$moddir/configuration/bash" '/etc/bash.bashrc' + inst "$moddir/configuration/bash" '/etc/profile' fi - # endregion - inst_multiple \ awk \ - basename \ - bash \ - blockdev \ - cat \ - cut \ - dd \ - diff \ - dirname \ - dmsetup \ + basename bash blockdev \ + cat cut \ + dd diff dirname dmsetup \ find \ genfstab \ grep \ insmod \ - losetup \ - lsblk \ - mktemp \ - mount \ - mountpoint \ + losetup lsblk \ + mktemp mount mountpoint \ qemu-img \ - sed \ - sleep \ - sort \ - touch \ - tr \ + sed sleep sort \ + touch tr \ wget } -- cgit v1.2.3-55-g7522