summaryrefslogtreecommitdiffstats
path: root/remote/modules
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules')
-rw-r--r--remote/modules/busybox/openslx-busybox-config2
-rw-r--r--remote/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service3
-rw-r--r--remote/modules/dnbd3/module.build5
-rw-r--r--remote/modules/dnbd3/module.conf1
-rw-r--r--remote/modules/grub/module.build18
-rw-r--r--remote/modules/grub/module.conf9
-rw-r--r--remote/modules/grub/module.conf.ubuntu7
-rwxr-xr-xremote/modules/systemd/data/opt/openslx/scripts/systemd-shutdown_prescript13
8 files changed, 55 insertions, 3 deletions
diff --git a/remote/modules/busybox/openslx-busybox-config b/remote/modules/busybox/openslx-busybox-config
index 29bb29ae..0f884d2b 100644
--- a/remote/modules/busybox/openslx-busybox-config
+++ b/remote/modules/busybox/openslx-busybox-config
@@ -365,7 +365,7 @@ CONFIG_WHICH=y
# Editors
#
CONFIG_AWK=y
-# CONFIG_FEATURE_AWK_LIBM is not set
+CONFIG_FEATURE_AWK_LIBM=y
CONFIG_FEATURE_AWK_GNU_EXTENSIONS=y
# CONFIG_CMP is not set
CONFIG_DIFF=y
diff --git a/remote/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service b/remote/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service
index 516cbfa2..7d34480d 100644
--- a/remote/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service
+++ b/remote/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service
@@ -1,6 +1,5 @@
[Unit]
Description=Setup dnbd3 kernel module and user space daemon
-After=sysinit.target
Before=shutdown.target
DefaultDependencies=no
@@ -9,3 +8,5 @@ ExecStart=/opt/openslx/scripts/systemd-setup_dnbd3
ExecStop=/opt/openslx/bin/dnbd3-client --kill
ExecStopPost=/opt/openslx/bin/rm /var/run/dnbd3.socket
Restart=on-abort
+
+
diff --git a/remote/modules/dnbd3/module.build b/remote/modules/dnbd3/module.build
index cdbd8251..fd56b4f7 100644
--- a/remote/modules/dnbd3/module.build
+++ b/remote/modules/dnbd3/module.build
@@ -27,13 +27,16 @@ build() {
cd "$MODULE_DIR/src/kmod" || perror "Could not CD to standalone dnbd3 kmod dir"
make MODULE_NAME=dnbd3 KDIR="$KERNEL_HEADERS_DIR" || perror "Could not compile kernel module"
mkdir -p "$MODULE_BUILD_DIR/lib/modules/dnbd3" || perror "Could not create lib/modules/dnbd3"
- mkdir -p "$MODULE_BUILD_DIR/opt/openslx/bin" || perror "Coould not create opt/openslx/bin"
+ mkdir -p "$MODULE_BUILD_DIR/opt/openslx/bin" || perror "Could not create opt/openslx/bin"
cp "$MODULE_DIR/src/kmod/dnbd3.ko" "$MODULE_BUILD_DIR/lib/modules/dnbd3/" || perror "could not cp dnbd3.ko"
cd "$MODULE_BUILD_DIR/opt/openslx/bin" || perror "Could not cd to build dir for client binary"
cmake "$MODULE_DIR/src/dnbd3" || perror "Could not cmake"
make dnbd3-client || perror "Could not make dnbd3-client"
chown root:root "dnbd3-client"
chmod +xs "dnbd3-client"
+ make dnbd3-server || perror "Could not make dnbd3-server"
+ chown root:root "dnbd3-server"
+ chmod +xs "dnbd3-server"
cd "$MODULE_DIR"
}
diff --git a/remote/modules/dnbd3/module.conf b/remote/modules/dnbd3/module.conf
index 631b0e23..f917b1b4 100644
--- a/remote/modules/dnbd3/module.conf
+++ b/remote/modules/dnbd3/module.conf
@@ -5,6 +5,7 @@ REQUIRED_GIT="git://git.openslx.org/dnbd3.git"
REQUIRED_COMMIT="bc4ee543ce5beec823ae0cbd811bb7febe43103f"
REQUIRED_BINARIES="
dnbd3-client
+ dnbd3-server
"
REQUIRED_DIRECTORIES="
/lib/modules
diff --git a/remote/modules/grub/module.build b/remote/modules/grub/module.build
new file mode 100644
index 00000000..119ea7bf
--- /dev/null
+++ b/remote/modules/grub/module.build
@@ -0,0 +1,18 @@
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+ return 0
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/grub/module.conf b/remote/modules/grub/module.conf
new file mode 100644
index 00000000..61c3deac
--- /dev/null
+++ b/remote/modules/grub/module.conf
@@ -0,0 +1,9 @@
+REQUIRED_BINARIES="
+ grub-install
+ grub-mkconfig
+ grub-probe
+ grub-bios-setup
+"
+REQUIRED_DIRECTORIES="
+ /usr/lib/grub/
+"
diff --git a/remote/modules/grub/module.conf.ubuntu b/remote/modules/grub/module.conf.ubuntu
new file mode 100644
index 00000000..bca61a90
--- /dev/null
+++ b/remote/modules/grub/module.conf.ubuntu
@@ -0,0 +1,7 @@
+REQUIRED_CONTENT_PACKAGES="
+ grub2-common
+ grub-common
+ grub-gfxpayload-lists
+ grub-pc
+ grub-pc-bin
+"
diff --git a/remote/modules/systemd/data/opt/openslx/scripts/systemd-shutdown_prescript b/remote/modules/systemd/data/opt/openslx/scripts/systemd-shutdown_prescript
index 3b5d7f92..e3a45ecf 100755
--- a/remote/modules/systemd/data/opt/openslx/scripts/systemd-shutdown_prescript
+++ b/remote/modules/systemd/data/opt/openslx/scripts/systemd-shutdown_prescript
@@ -38,6 +38,14 @@ umount_samba_shares() {
done
}
+backup_users(){
+ # create patch files to backup the users created by the openslx, so we can restore then in the next session.
+ for file in passwd shadow group; do
+ diff -u /home/openslx/.$file.backup /etc/$file > /home/openslx/.$file.patch
+ done
+ echo "Patch of /etc/{passwd,shadow,group} generated at /home/openslx/.{passwd,shadow,group}.patch"
+}
+
# Searching for nfs-shares in mtab:
if [ $(echo /etc/mtab | cut -d " " -f 3 | grep -q nfs) ]; then
umount_nfs_shares
@@ -47,4 +55,9 @@ fi
if [ $(echo /etc/mtab|cut -d " " -f 3 | grep -q cifs) ]; then
umount_samba_shares
fi
+
+if [ -d /home/openslx ]; then
+ backup_users
+fi
+
exit $ERRORLEVEL