summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/boot_config_vars31
-rw-r--r--doc/kcl_config_vars2
-rwxr-xr-xmltk2
-rwxr-xr-x[-rw-r--r--]remote/modules/beamergui/data/opt/openslx/vmchooser/sessionstart.d/99-kill_beamergui2
-rw-r--r--remote/modules/busybox/openslx-busybox-config2
l---------remote/modules/cpugovernor/data/etc/systemd/system/basic.target.wants/cpu-governor.service1
-rw-r--r--remote/modules/cpugovernor/data/etc/systemd/system/cpu-governor.service6
-rwxr-xr-xremote/modules/cpugovernor/data/opt/openslx/scripts/systemd-cpu_governor62
-rw-r--r--remote/modules/cpugovernor/module.build11
-rw-r--r--remote/modules/cpugovernor/module.conf3
-rwxr-xr-xremote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx2
-rwxr-xr-xremote/modules/gdisk/data/inc/prepare_localhd.functions163
-rwxr-xr-xremote/modules/gdisk/data/inc/setup_gpt.differentapproach157
-rwxr-xr-xremote/modules/gdisk/data/inc/setup_gpt.old160
-rw-r--r--remote/modules/gdisk/module.build19
-rw-r--r--remote/modules/gdisk/module.conf94
-rw-r--r--remote/modules/gdisk/module.conf.centos5
-rw-r--r--remote/modules/pam-common-share/data/opt/openslx/scripts/pam_script_mount_common_share131
-rwxr-xr-xremote/modules/pam/data/opt/openslx/scripts/pam_script_auth15
-rwxr-xr-xremote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close8
-rwxr-xr-xremote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr (renamed from server/modules/pvs2mgr-freiburg/opt/openslx/scripts/setup-pvsmgr)0
-rwxr-xr-x[-rw-r--r--]remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient9
-rwxr-xr-xremote/modules/pvs2/data/opt/openslx/xsessions/pvs2mgr.desktop (renamed from server/modules/pvs2mgr-freiburg/opt/openslx/xsessions/default.desktop)6
-rwxr-xr-xremote/modules/pvs2/data/usr/share/xsessions/pvs2mgr.desktop7
-rw-r--r--remote/modules/systemd-distro/README12
-rw-r--r--remote/modules/systemd-distro/TODO2
-rw-r--r--remote/modules/systemd-distro/data/etc/systemd/system.conf49
-rw-r--r--remote/modules/systemd-distro/data/etc/systemd/system/network-interface@.service9
-rw-r--r--remote/modules/systemd-distro/data/etc/systemd/system/systemd-halt.service18
-rw-r--r--remote/modules/systemd-distro/data/etc/systemd/system/systemd-poweroff.service18
-rw-r--r--remote/modules/systemd-distro/data/etc/systemd/system/systemd-reboot.service18
-rwxr-xr-xremote/modules/systemd-distro/data/opt/openslx/scripts/systemd-shutdown_prescript50
-rwxr-xr-xremote/modules/systemd-distro/data/sbin/haltbin0 -> 357784 bytes
-rwxr-xr-xremote/modules/systemd-distro/data/sbin/initbin0 -> 1214408 bytes
-rwxr-xr-xremote/modules/systemd-distro/data/sbin/poweroffbin0 -> 357784 bytes
-rwxr-xr-xremote/modules/systemd-distro/data/sbin/rebootbin0 -> 357784 bytes
-rwxr-xr-xremote/modules/systemd-distro/data/sbin/runlevelbin0 -> 357784 bytes
-rwxr-xr-xremote/modules/systemd-distro/data/sbin/shutdownbin0 -> 357784 bytes
-rwxr-xr-xremote/modules/systemd-distro/data/sbin/telinitbin0 -> 357784 bytes
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/sysctl.d/50-default.conf39
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/autovt@.service49
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/basic.target14
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/bluetooth.target11
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/console-getty.service32
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/console-shell.service32
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/ctrl-alt-del.target17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/dbus-org.freedesktop.login1.service23
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/debug-shell.service33
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/default.target18
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/dev-hugepages.mount19
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/dev-mqueue.mount19
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/emergency.service31
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/emergency.target13
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/final.target13
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/getty.target11
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/getty@.service49
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/graphical.target18
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/halt-local.service20
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/halt.target17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/hibernate.target13
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/hybrid-sleep.target13
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/kexec.target17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/getty.target11
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/systemd-logind.service23
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/systemd-user-sessions.service17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/network-online.target11
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/network.target14
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/paths.target10
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/poweroff.target17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/printer.target11
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/proc-sys-fs-binfmt_misc.automount18
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/proc-sys-fs-binfmt_misc.mount17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/rc-local.service20
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/reboot.target17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/remote-fs.target3
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/serial-getty@.service36
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/shutdown.target12
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sigpwr.target10
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sleep.target13
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/smartcard.target11
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target10
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-journald.socket26
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-shutdownd.socket18
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-udevd-control.socket19
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-udevd-kernel.socket19
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sound.target11
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/suspend.target13
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/swap.target10
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sys-fs-fuse-connections.mount20
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sys-kernel-config.mount20
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target14
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/dev-hugepages.mount19
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/dev-mqueue.mount19
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount18
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/sys-fs-fuse-connections.mount20
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/sys-kernel-config.mount20
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-binfmt.service26
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-journald.service26
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-modules-load.service27
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-sysctl.service26
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup.service23
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-udev-trigger.service20
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-udevd.service23
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-vconsole-setup.service20
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/syslog.socket40
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/system-update.target16
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-binfmt.service26
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-halt.service17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-hibernate.service17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-hybrid-sleep.service17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-journald.service26
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-journald.socket26
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-logind.service23
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-modules-load.service27
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-nspawn@.service18
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-poweroff.service17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-reboot.service17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-shutdownd.service15
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-shutdownd.socket18
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-suspend.service17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-sysctl.service26
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-tmpfiles-setup-dev.service17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-tmpfiles-setup.service23
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udev-settle.service31
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udev-trigger.service20
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd-control.socket19
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd-kernel.socket19
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd.service23
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-user-sessions.service17
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-vconsole-setup.service20
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/time-sync.target14
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/timers.target10
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/systemd/system/user@.service23
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/udev/rules.d/70-uaccess-floppy.rules8
-rw-r--r--remote/modules/systemd-distro/data/usr/lib/udev/rules.d/99-systemd.rules56
-rw-r--r--remote/modules/systemd-distro/module.build15
-rw-r--r--remote/modules/systemd-distro/module.conf8
-rw-r--r--remote/modules/systemd-distro/module.conf.centos7
-rw-r--r--remote/modules/systemd-distro/module.conf.debian13
-rw-r--r--remote/modules/systemd-distro/module.conf.fedora11
-rw-r--r--remote/modules/systemd-distro/module.conf.opensuse10
-rw-r--r--remote/modules/systemd-distro/module.conf.scientific37
-rw-r--r--remote/modules/systemd-distro/module.conf.ubuntu12
-rw-r--r--remote/modules/systemd-distro/module.conf.ubuntu.1471
-rwxr-xr-xremote/modules/vbox/data/opt/openslx/scripts/vmchooser-xml_filter74
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt1
-rwxr-xr-xremote/modules/vmchooser2/data/opt/openslx/scripts/vmchooser-run_virt1
-rwxr-xr-xremote/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart2
-rw-r--r--remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig3
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/inc/udhcpc-trigger4
-rw-r--r--remote/rootfs/rootfs-stage32/data/etc/systemd/system/setup-partitions.service1
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions212
-rw-r--r--remote/rootfs/rootfs-stage32/module.conf8
l---------server/configs/curitiba/partitioner1
-rw-r--r--server/modules/cups-freiburg/etc/cups/ppd/ZRZ_DELL.ppd259
-rw-r--r--server/modules/openstack-pam-hooks/opt/openslx/scripts/pam_script_auth.d/00-openstack6
-rw-r--r--server/modules/openstack-pam-hooks/opt/openslx/scripts/pam_script_ses_close.d/00-openstack9
-rw-r--r--server/modules/pam-freiburg/opt/openslx/scripts/pam_script_mount_persistent4
l---------server/modules/partitioner/etc/systemd/system/multi-user.target.wants/partitioner.service1
-rw-r--r--server/modules/partitioner/etc/systemd/system/partitioner.service20
-rwxr-xr-xserver/modules/partitioner/opt/openslx/scripts/systemd-partitioner497
l---------server/modules/pvs2mgr-autologin/opt/openslx/xsessions/default.desktop1
164 files changed, 4047 insertions, 271 deletions
diff --git a/doc/boot_config_vars b/doc/boot_config_vars
index 36293d87..07866031 100644
--- a/doc/boot_config_vars
+++ b/doc/boot_config_vars
@@ -52,3 +52,34 @@ remote logging:
SLX_REMOTE_LOG URL where to post log to, eg. 'http://server/log.php'
POST variables: type, description, longdesc
+partitioner & setp partitions:
+
+SLX_PARTITION_TYPE='GPT|msdos' #Choose partition table type, if variable is not set partitioner
+ #will ask user or in silent mode use 'msdos' as default
+
+SLX_CHOOSEN_DISK='sda' #If no HDD is specified, the partitioner will either ask the user
+ #or in silent mode choose the only HDD available or abort if more
+ #then one HDD is present.
+
+SLX_AUTOMATIC_PARTITIONING='yes' #silent mode, restarts the machine automatically after partitioning
+
+SLX_PARTITION_TABLE=' #The partition table variable is used by both the partitioner and
+ 44,1G,/tmp #setup-partition script. The values per partition are as follows:
+ 43,1G,/boot,bootable #unique ID, size, [mountpoint], [options]
+ 42,1G,/cache/export/dnbd3 #The ID is used as is for msdos and for GPT concatenated with trailing
+ 41,1G,/home #zeros, example: msdos: 44 GPT: 44000000-0000-0000-0000-000000000000
+ 82,1G' #Attention: without a mount point, the setup-partition script won't mount
+ #the partition. Swap partition doesn't need a mount point
+ #Existing linux partitions will automatically be mountet under /media
+ #and don't need to be specified here.
+ #The only optional argument currently used at the moment is 'bootable'
+ #to mark a partition as such
+
+#If no partition table variable was specifies, the partitioner and setup-scripts will assume
+#the following default partition table:
+
+SLX_PARTITION_TABLE='
+ 44,10G,/tmp
+ 45,10G,/var/scratch
+ 82,4G'
+
diff --git a/doc/kcl_config_vars b/doc/kcl_config_vars
index 66166299..4c51d5dc 100644
--- a/doc/kcl_config_vars
+++ b/doc/kcl_config_vars
@@ -26,3 +26,5 @@ LABEL u1304x64
APPEND slxsrv=10.254.221.6 slxbase=u1304x64 vga=current splash quiet
IPAPPEND 3
+To start the partitioner, the partitioner module must be included in the configuration
+and 'partitioner' must be specifies in the KCL
diff --git a/mltk b/mltk
index 2a42a103..3fea8454 100755
--- a/mltk
+++ b/mltk
@@ -127,7 +127,7 @@ check_devtools() {
pinfo "zypper install gcc gcc-c++ make m4 binutils git module-init-tools patch squashfs pkg-config"
pinfo "to install missing development tools."
;;
- fedora | scientific)
+ fedora | scientific | centos)
pinfo "yum install redhat-lsb gcc-c++ gcc make m4 binutils pkgconfig patch cmake"
;;
*)
diff --git a/remote/modules/beamergui/data/opt/openslx/vmchooser/sessionstart.d/99-kill_beamergui b/remote/modules/beamergui/data/opt/openslx/vmchooser/sessionstart.d/99-kill_beamergui
index 13d9c4ed..1b4e61c8 100644..100755
--- a/remote/modules/beamergui/data/opt/openslx/vmchooser/sessionstart.d/99-kill_beamergui
+++ b/remote/modules/beamergui/data/opt/openslx/vmchooser/sessionstart.d/99-kill_beamergui
@@ -1,3 +1,3 @@
#!/bin/ash
killall beamergui
-true
+exit 0
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/cpugovernor/data/etc/systemd/system/basic.target.wants/cpu-governor.service b/remote/modules/cpugovernor/data/etc/systemd/system/basic.target.wants/cpu-governor.service
new file mode 120000
index 00000000..878a1676
--- /dev/null
+++ b/remote/modules/cpugovernor/data/etc/systemd/system/basic.target.wants/cpu-governor.service
@@ -0,0 +1 @@
+../cpu-governor.service \ No newline at end of file
diff --git a/remote/modules/cpugovernor/data/etc/systemd/system/cpu-governor.service b/remote/modules/cpugovernor/data/etc/systemd/system/cpu-governor.service
new file mode 100644
index 00000000..e2ba1491
--- /dev/null
+++ b/remote/modules/cpugovernor/data/etc/systemd/system/cpu-governor.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Sets the CPU governor
+
+[Service]
+Type=oneshot
+ExecStart=/opt/openslx/scripts/systemd-cpu_governor
diff --git a/remote/modules/cpugovernor/data/opt/openslx/scripts/systemd-cpu_governor b/remote/modules/cpugovernor/data/opt/openslx/scripts/systemd-cpu_governor
new file mode 100755
index 00000000..115163c7
--- /dev/null
+++ b/remote/modules/cpugovernor/data/opt/openslx/scripts/systemd-cpu_governor
@@ -0,0 +1,62 @@
+#!/bin/ash
+#
+# Script to set the CPU governor to ondemand on all cores
+#
+
+# source global config
+. /opt/openslx/config || \
+ { echo "ERROR: Could not source /opt/openslx/config."; exit 1; }
+
+# set the governor to the one given in SLX_GOVERNOR
+TARGET_GOVERNOR=""
+if [ -n "$SLX_GOVERNOR" ]; then
+ TARGET_GOVERNOR="$SLX_GOVERNOR"
+else
+ # use 'ondemand' per default
+ TARGET_GOVERNOR="ondemand"
+fi
+echo "Setting governor to $TARGET_GOVERNOR"
+# global information needed
+# CORES is the range of cores present, on bwpc4 it has the value '0-3'
+# thus the split: MINCORE=0 MAXCORE=3
+CORES="$(cat /sys/devices/system/cpu/present)"
+MINCORE="$(echo $CORES | awk -F "-" '{print $1}')"
+MAXCORE="$(echo $CORES | awk -F "-" '{print $2}')"
+
+# Helper function 'test_for_gov'
+# Usage:
+# test_for_gov <governor>
+# Example:
+# test_for_gov "ondemand"
+# Return 0 if it is supported by all cpus, 1 otherwise
+test_for_gov() {
+ # if no argument is given, print error and exit (yes exit the whole script!)
+ [ $# -ne 1 ] && echo "Usage: test_for_gov <governor>. No arguments given!" && exit 1
+ local GOVERNOR="$1"
+
+ # check for each cpu just to be safe
+ # ash-style loop ....
+ local i=$MINCORE
+ while [ $i -le $MAXCORE ]; do
+ # check if the given governor is supported
+ grep -q "${GOVERNOR}" /sys/devices/system/cpu/cpu${i}/cpufreq/scaling_available_governors || return 1;
+ # increment
+ true $(( i++ ))
+ done
+ return 0;
+}
+# now actually test the cpus for the 'ondemand' cpu governor
+if test_for_gov "${TARGET_GOVERNOR}"; then
+ # ok, so now set the governor to 'ondemand' for all cores
+ i=$MINCORE
+ while [ $i -le $MAXCORE ]; do
+ if ! echo "${TARGET_GOVERNOR}" > /sys/devices/system/cpu/cpu${i}/cpufreq/scaling_governor; then
+ echo "ERROR: Could not set the cpu governor to '${TARGET_GOVERNOR}'!"
+ exit 1
+ fi
+ true $(( i++ ))
+ done
+else
+ echo "ERROR: '${TARGET_GOVERNOR}' is not supported by this machine!"
+ exit 1
+fi
diff --git a/remote/modules/cpugovernor/module.build b/remote/modules/cpugovernor/module.build
new file mode 100644
index 00000000..97e93235
--- /dev/null
+++ b/remote/modules/cpugovernor/module.build
@@ -0,0 +1,11 @@
+fetch_source() {
+ :
+}
+
+build() {
+ :
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/cpugovernor/module.conf b/remote/modules/cpugovernor/module.conf
new file mode 100644
index 00000000..0cd03752
--- /dev/null
+++ b/remote/modules/cpugovernor/module.conf
@@ -0,0 +1,3 @@
+REQUIRED_BINARIES=""
+REQUIRED_LIBRARIES=""
+REQUIRED_DIRECTORIES=""
diff --git a/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx b/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx
index 66ab2189..dd8cd8ba 100755
--- a/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx
+++ b/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx
@@ -78,7 +78,7 @@ case "$1" in
fi
# get domain, hostname and thus fqdn from DNS
- dns_fqdn=$(rdns "$ip")
+ dns_fqdn=$(/opt/openslx/bin/busybox timeout -t 3 rdns "$ip")
dns_short="${dns_fqdn%%.*}"
# check if it is fqdn
if [ "$dns_fqdn" == "$dns_short" ]; then
diff --git a/remote/modules/gdisk/data/inc/prepare_localhd.functions b/remote/modules/gdisk/data/inc/prepare_localhd.functions
new file mode 100755
index 00000000..45075ab0
--- /dev/null
+++ b/remote/modules/gdisk/data/inc/prepare_localhd.functions
@@ -0,0 +1,163 @@
+#!/bin/ash
+# Copyright (c) 2014 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your feedback to feedback@openslx.org
+#
+# General information about OpenSLX can be found under http://openslx.org
+#
+# Local hard disk autodetection script for OpenSLX linux stateless clients,
+# detecting special GPT partitions
+
+#############################################################################
+
+# Patition IDs
+# Prefix for all paritions is 0FC63DAF-8483-4772-8E79-9999999999
+# Suffix:
+# 44: non-persistent scratch partition
+# 45: persistent partiton
+# 46: non-persistent openslx partition for config, overlayfs and qcow images
+
+# We use special non assigned partition type for harddisk scratch
+# space, thus no normal filesystem will be incidentally deleted or
+# corrupted
+
+# Set disks to none
+ID44=
+ID45=
+ID46=
+
+# General formatter for the /tmp partition on a local harddisk
+diskfm () {
+ mopt="" # Global var!
+ local target="$1"
+ local fslist="xfs jfs ext4"
+ local fs
+ local path
+ [ $# -ge 2 ] && fslist="$2"
+ for fs in $fslist ; do
+ unset available
+ case $(cat /proc/filesystems) in
+ *${fs}*) available=yes;;
+ *) modprobe "${fs}" && available=yes;;
+ esac
+ if [ -n "${available}" ]; then
+ unset found
+ if which "mkfs.$fs" >/dev/null; then
+ found=yes
+ case "mkfs.$fs" in
+ mkfs.xfs)
+ fopt="-fq"
+ ;;
+ mkfs.jfs)
+ fopt="-q"
+ ;;
+ mkfs.ext4)
+ fopt="-Fq"
+ ;;
+ esac
+ mkfs.$fs ${fopt} "${target}"
+ fi
+ [ -n "$found" ] && break
+ fi
+ done
+}
+
+# function format_pid ()
+# Formats partition with id 44, 45, 46
+# expects id as parameter
+# usage: format_pid [44|45|46]
+format_pid () {
+ local fmtpid=$1
+ local target
+ case $fmtpid in
+ 44)
+ target=$ID44
+ ;;
+ 45)
+ target=$ID45
+ ;;
+ 46)
+ target=$ID46
+ ;;
+ esac
+ if echo $target | grep -q '/dev/disk/'
+ then
+ # check for supported filesystem and formatter
+ diskfm $target
+ else
+ echo "Could not format partition ID $fmtpid"
+ fi
+}
+
+# function mount_pid ()
+# Mounts partition with id 44, 45, 46
+# expects id and mountpoint as parameter
+# usage: mount_pid [44|45|46] $MNT
+mount_pid () {
+ local mntpid=$1
+ local target=$2
+ local source
+ if [ "x$2" = "x" ]
+ then
+ echo "No mountpoint specified dummy!"
+ else
+ case $mntpid in
+ 44)
+ source=$ID44
+ ;;
+ 45)
+ source=$ID45
+ ;;
+ 46)
+ source=$ID46
+ ;;
+ esac
+ mkdir -p $target
+ if busybox mount -t auto "$source" "$target"
+ then
+ [ "x$mntpid}" = "x44" ] && chmod a+rwxt $target
+ if echo "$target" | grep -Eq "^mnt/|^/mnt/"
+ then
+ fstabtarget=$(echo $target | sed -re "s/[/]{0,1}mnt//")
+ echo -e "$source\t$fstabtarget\tauto\tnoexec\t0 0" \
+ >>/mnt/etc/fstab
+ fi
+ else
+ echo "Could not mount partition ID $mntpid"
+ fi
+ fi
+}
+
+# Get partition types
+hdisks=$(ls /dev/disk/by-path/*-part[0-9]* \
+ | sed -re "s,(.*)-part[0-9]*,\1," \
+ | sort -u)
+
+if echo $hdisks | grep -q '/dev/disk/'
+ then
+ for hd in $(echo $hdisks)
+ do
+ upartid=$(sgdisk -p $hd 2>/dev/null | awk '$6~/FFFF/ {print $1}')
+ for upt in $(echo $upartid)
+ do
+ echo "${hd}-part${upt} $(sgdisk -i $upt $hd)" \
+ | awk '$5 ~ /0FC63DAF-8483-4772-8E79-[0]{10}4[4-6]/ \
+ {print $5 "=" $1}' \
+ | sed -re "s,0FC63DAF-8483-4772-8E79-[0]{10},ID," \
+ >> /etc/hdisks.conf
+ done
+ done
+ if [ -r /etc/hdisks.conf ]
+ then
+ . /etc/hdisks.conf
+ echo -e "Partitions found:\n$(cat /etc/hdisks.conf | cut -d'=' -f1)"
+ else
+ echo "No pratition IDs 44, 45 or 46 found"
+ fi
+
+fi
+
diff --git a/remote/modules/gdisk/data/inc/setup_gpt.differentapproach b/remote/modules/gdisk/data/inc/setup_gpt.differentapproach
new file mode 100755
index 00000000..25b8dda3
--- /dev/null
+++ b/remote/modules/gdisk/data/inc/setup_gpt.differentapproach
@@ -0,0 +1,157 @@
+#!/bin/ash
+# Copyright (c) 2014 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your feedback to feedback@openslx.org
+#
+# General information about OpenSLX can be found under http://openslx.org
+#
+# Local hard disk autodetection script for OpenSLX linux stateless clients,
+# detecting special GPT partitions
+
+#############################################################################
+
+# Patition IDs
+# Prefix for all paritions is 0FC63DAF-8483-4772-8E79-9999999999
+# Suffix:
+# 44: non-persistent scratch partition
+# 45: persistent partiton
+# 46: non-persistent openslx partition for config, overlayfs and qcow images
+
+# We use special non assigned partition type for harddisk scratch
+# space, thus no normal filesystem will be incidentally deleted or
+# corrupted
+
+PREFIX=/mnt
+
+# Set disks to none
+ID44=
+ID45=
+ID46=
+
+# Mountpoints
+ID44MNT=/tmp
+ID45MNT=/opt/openslx/mnt/persistent
+ID46MNT=/opt/openslx/mnt/non-persistent
+
+# General formatter for the /tmp partition on a local harddisk
+diskfm () {
+ mopt="" # Global var!
+ local target="$1"
+ local fslist="xfs jfs ext4"
+ local fs
+ local path
+ [ $# -ge 2 ] && fslist="$2"
+ for fs in $fslist ; do
+ unset available
+ case $(cat /proc/filesystems) in
+ *${fs}*) available=yes;;
+ *) modprobe "${fs}" && available=yes;;
+ esac
+ if [ -n "${available}" ]; then
+ unset found
+ if which "mkfs.$fs" ; then
+ found=yes
+ case "mkfs.$fs" in
+ mkfs.xfs)
+ fopt="-fq"
+ ;;
+ mkfs.jfs)
+ fopt="-q"
+ ;;
+ mkfs.ext4)
+ fopt="-Fq"
+ ;;
+ esac
+ mkfs.$fs ${fopt} "${target}"
+ fi
+ [ -n "$found" ] && break
+ fi
+ done
+}
+
+# Format and mount ID44 (/tmp)
+mount_id44 () {
+ HAVE_TMP=no
+ if echo $ID44 | grep -q '/dev/disk/'
+ then
+ # check for supported filesystem and formatter
+ if diskfm $ID44; then
+ mkdir -p $PREFIX$ID44MNT
+ if mount -t auto "$ID44" "$PREFIX$ID44MNT" 2>/dev/null
+ then
+ chmod a+rwxt $PREFIX$ID44MNT
+ echo -e "$ID44\t$ID44MNT\tauto\tnoexec\t0 0" >> "/etc/fstab"
+ HAVE_TMP=yes
+ else
+ echo "Could not mount partition $ID44"
+ fi
+ else
+ echo "Could not format partition $ID44"
+ fi
+ fi
+}
+
+# Mount persistent partition 45
+mount_id45 () {
+ HAVE_PERSISTENT=no
+ if echo $ID45 | grep -q '/dev/disk/'
+ then
+ mkdir -p $PREFIX$ID45MNT
+ if mount -t auto "$ID45" "$PREFIX$ID45MNT" 2>/dev/null
+ then
+ echo -e "$ID45\t$ID45MNT\tauto\tnoauto\t0 0" >> "/etc/fstab"
+ HAVE_PERSISTENT=yes
+ else
+ echo "Could not mount persistent partition $ID45"
+ fi
+ fi
+}
+
+# Mount non-persistent partition 46
+mount_id46 () {
+ HAVE_NONPERSISTENT=no
+ if echo $ID46 | grep -q '/dev/disk/'
+ then
+ # check for supported filesystem and formatter
+ if diskfm $ID46; then
+ mkdir -p $PREFIX$ID46MNT
+ if mount -t auto -o noexec "$ID46" "$PREFIX$ID46MNT" 2>/dev/null
+ then
+ echo -e "$ID46\t$ID46MNT\tauto\tnoauto,noexec\t0 0" >> "/etc/fstab"
+ HAVE_NONPERSISTENT=yes
+ else
+ echo "Could not mount non-persistent partition $ID46"
+ fi
+ else
+ echo "Could not format partition $ID44"
+ fi
+ fi
+}
+
+# Get partition types
+hdisks=$(ls /dev/disk/by-path/*-part[0-9]* \
+ | sed -re "s,(.*)-part[0-9]*,\1," \
+ | sort -u)
+
+if echo $hdisks | grep -q '/dev/disk/'
+ then
+ for hd in $(echo $hdisks)
+ do
+ upartid=$(sgdisk -p $hd 2>/dev/null | awk '$6~/FFFF/ {print $1}')
+ for upt in $(echo $upartid)
+ do
+ echo "${hd}-part${upt} $(sgdisk -i $upt $hd)" \
+ | awk '$5 ~ /0FC63DAF-8483-4772-8E79-[0]{10}4[4-6]/ \
+ {print $5 "=" $1}' \
+ | sed -re "s,0FC63DAF-8483-4772-8E79-[0]{10},ID," \
+ >> /etc/hdisks.conf
+ done
+ done
+ [ -r /etc/hdisks.conf ] && . /etc/hdisks.conf
+
+fi
+
diff --git a/remote/modules/gdisk/data/inc/setup_gpt.old b/remote/modules/gdisk/data/inc/setup_gpt.old
new file mode 100755
index 00000000..a4c971e4
--- /dev/null
+++ b/remote/modules/gdisk/data/inc/setup_gpt.old
@@ -0,0 +1,160 @@
+#!/bin/ash
+# Copyright (c) 2013 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your feedback to feedback@openslx.org
+#
+# General information about OpenSLX can be found under http://openslx.org
+#
+# Local hard disk autodetection script for OpenSLX linux stateless clients,
+# detecting swap and special partitions
+
+#############################################################################
+
+# Mount point for persistent scratch partition (type 45)
+PERSISTENT="/opt/openslx/persistent"
+
+# General formatter for the /tmp partition on a local harddisk
+diskfm () {
+ mopt="" # Global var!
+ local target="$1"
+ local fslist="xfs jfs ext3 ext2 ext4"
+ local fs
+ local path
+ [ $# -ge 2 ] && fslist="$2"
+ for fs in $fslist ; do
+ unset available
+ case $(cat /proc/filesystems) in
+ *${fs}*) available=yes;;
+ *) modprobe "${fs}" && available=yes;;
+ esac
+ if [ -n "${available}" ]; then
+ unset found
+ if which "mkfs.$fs" ; then
+ found=yes
+ case "mkfs.$fs" in
+ mkfs.xfs)
+ fopt="-f -b size=4k -s size=4k -l size=512b" # fastest formatting possible :)
+ mopt="-o noexec"
+ ;;
+ mkfs.ext2)
+ fopt="-Fq"
+ mopt="-o nocheck,noexec"
+ ;;
+ mkfs.ext3|mkfs.ext4)
+ fopt="-Fq"
+ mopt="-o noexec"
+ ;;
+ mkfs.reiserfs)
+ fopt="-f"
+ mopt="-o noexec"
+ ;;
+ mkfs.jfs)
+ fopt="-q"
+ mopt="-o noexec"
+ ;;
+ esac
+ mkfs.$fs ${fopt} "${target}"
+ fi
+ [ -n "$found" ] && break
+ fi
+ done
+}
+
+mount_temp () {
+ local PRE=$(pwd)
+ if ! cd /tmp; then
+ mount_temp_fallback $@
+ return $?
+ fi
+ mount $@ /tmp || return 1
+ chmod a+rwxt /tmp
+ # Move stuff from working directory, which is old /tmp, to new /tmp just mounted
+ mv ./* ./.[!.]* ./..?* /tmp/ 2> /dev/null
+ local OLD=$(LANG=C ls -alh | grep -v -E ' \.\.?$' | grep -v '^total')
+ [ -n "$OLD" ] && echo -- "Leftovers:" && echo -- "$OLD"
+ cd "$PRE"
+}
+
+mount_temp_fallback () {
+ mkdir -p /tmptmp
+ mv /tmp/* /tmp/.* /tmptmp/ 2> /dev/null
+ mount $@ /tmp || return 1
+ chmod a+rwxt /tmp
+ mv /tmptmp/* /tmptmp/.* /tmp/
+ rmdir /tmptmp
+ return 0
+}
+
+fdisk -l | sed -n "/^\/dev\//p" > "/etc/disk.partition"
+
+echo "Partitions:"
+cat "/etc/disk.partition"
+
+
+# sgdisk -i 1 /dev/sda | grep -o "0FC63DAF-8483-4772-8E79-[4]\{12\}"
+
+# Check for standard swap partitions and make them available to the system
+HAVE_SWAP=no
+for hdpartnr in $(sed -n -e "/ 82 /p" "/etc/disk.partition" | sed -e "s/[[:space:]].*//"); do
+ echo -e "$hdpartnr\tswap\t\tswap\t\tdefaults\t 0 0" >> "/etc/fstab"
+ swapon "$hdpartnr" -p 10 && HAVE_SWAP=yes # low priority, in case we have zram swap, prefer that)
+done
+
+# We use special non assigned partition type (id44) for harddisk scratch
+# space, thus no normal filesystem will be incidentally deleted or
+# corrupted
+HAVE_TEMP=no
+for hdpartnr in $(sed -n -e "/ 44 /p" "/etc/disk.partition" | sed -e "s/[[:space:]].*//"); do
+ # check for supported filesystem and formatter
+ if diskfm "$hdpartnr"; then
+ # echo "$hdpartnr is mounted to /mnt/tmp at $(sysup)" >/tmp/tmpready
+ mount_temp "$mopt" "$hdpartnr" || continue
+ echo -e "${hdpartnr}\t/tmp\t\tauto\t\tnoexec\t 0 0" >> "/etc/fstab"
+ HAVE_TEMP=yes
+ break
+ else
+ echo "formatting failed for some reason"
+ fi # Made this non-forking, systemd should handle it - 2013-05-28
+done
+
+# Put detected linux partitions (83) into /etc/fstab with "noauto", special
+# partition 45 (persistent scratch) to /var/scratch and 46 to /var/openslx
+HAVE_PERSISTENT=no
+for partid in 83 45 46 ; do
+ for hdpartnr in $(sed -n -e "/ ${partid} /p" "/etc/disk.partition" | sed -e "s/[[:space:]].*//"); do
+ if [ "${partid}" -eq 83 ]; then
+ mkdir -p "/media/${hdpartnr#/dev/*}"
+ echo -e "${hdpartnr}\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto,noexec\t 0 0" >> "/etc/fstab"
+ elif [ "${partid}" -eq 45 -a "$HAVE_PERSISTENT" = "no" ]; then
+ mkdir -p "$PERSISTENT"
+ if ! mount -t auto -o noexec "${hdpartnr}" "$PERSISTENT"; then
+ diskfm "$hdpartnr" "jfs xfs ext3" || continue
+ mount -t auto -o noexec "${hdpartnr}" "$PERSISTENT" || continue
+ fi
+ HAVE_PERSISTENT=yes
+ echo -e "${hdpartnr}\t${PERSISTENT}\tauto\t\tnoauto,noexec\t\t 0 0" >> "/etc/fstab"
+ elif [ "${partid}" -eq 46 ]; then
+ mkdir -p "/media/${hdpartnr#/dev/*}"
+ echo -e "${hdpartnr}\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto\t\t 0 0" >> "/etc/fstab"
+ fi
+ done
+done
+[ "$HAVE_PERSISTENT" = "no" -a -d "$PERSISTENT" ] && rm -f "$PERSISTENT"
+
+mount -a
+
+# Make huge tmpfs if nothing could be mounted for /tmp
+if [ "$HAVE_TEMP" = "no" ]; then
+ mount_temp -t tmpfs -o size=20G none
+ slxlog "partition-temp" "Running /tmp on tmpfs only!" "/etc/disk.partition"
+fi
+if [ "$HAVE_SWAP" = "no" ]; then
+ slxlog "partition-swap" "Have no (formatted) swap partition, using zram swap only!" "/etc/disk.partition"
+fi
+
+exit 0
+
diff --git a/remote/modules/gdisk/module.build b/remote/modules/gdisk/module.build
new file mode 100644
index 00000000..59356ded
--- /dev/null
+++ b/remote/modules/gdisk/module.build
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+}
+
+post_copy() {
+ copy_kernel_modules
+}
+
diff --git a/remote/modules/gdisk/module.conf b/remote/modules/gdisk/module.conf
new file mode 100644
index 00000000..3d2254cd
--- /dev/null
+++ b/remote/modules/gdisk/module.conf
@@ -0,0 +1,94 @@
+REQUIRED_MODULES="
+ kernel
+"
+REQUIRED_BINARIES="
+ sgdisk
+ mkfs.xfs
+ mkfs.ext4
+"
+REQUIRED_KERNEL_MODULES="
+ kernel/fs/xfs/xfs.ko
+ kernel/fs/ext4/ext4.ko
+ kernel/fs/jfs/jfs.ko
+ kernel/drivers/scsi/3w-9xxx.ko
+ kernel/drivers/scsi/3w-sas.ko
+ kernel/drivers/scsi/aacraid/aacraid.ko
+ kernel/drivers/scsi/aic7xxx/aic79xx.ko
+ kernel/drivers/scsi/arcmsr/arcmsr.ko
+ kernel/drivers/scsi/bfa/bfa.ko
+ kernel/drivers/scsi/bnx2fc/bnx2fc.ko
+ kernel/drivers/scsi/csiostor/csiostor.ko
+ kernel/drivers/scsi/fcoe/fcoe.ko
+ kernel/drivers/scsi/fnic/fnic.ko
+ kernel/drivers/scsi/hpsa.ko
+ kernel/drivers/scsi/hptiop.ko
+ kernel/drivers/scsi/hv_storvsc.ko
+ kernel/drivers/scsi/initio.ko
+ kernel/drivers/scsi/isci/isci.ko
+ kernel/drivers/scsi/libiscsi.ko
+ kernel/drivers/scsi/lpfc/lpfc.ko
+ kernel/drivers/scsi/megaraid/megaraid_sas.ko
+ kernel/drivers/scsi/mpt2sas/mpt2sas.ko
+ kernel/drivers/scsi/mpt3sas/mpt3sas.ko
+ kernel/drivers/scsi/mvsas/mvsas.ko
+ kernel/drivers/scsi/mvumi.ko
+ kernel/drivers/scsi/pm8001/pm80xx.ko
+ kernel/drivers/scsi/pmcraid.ko
+ kernel/drivers/scsi/qla2xxx/qla2xxx.ko
+ kernel/drivers/scsi/qla4xxx/qla4xxx.ko
+ kernel/drivers/scsi/scsi_transport_sas.ko
+ kernel/drivers/scsi/sd_mod.ko
+ kernel/drivers/scsi/stex.ko
+ kernel/drivers/scsi/ufs/ufshcd.ko
+ kernel/drivers/scsi/virtio_scsi.ko
+ kernel/drivers/scsi/vmw_pvscsi.ko
+ kernel/drivers/ata/pata_ali.ko
+ kernel/drivers/ata/pata_it821x.ko
+ kernel/drivers/ata/pata_acpi.ko
+ kernel/drivers/ata/pata_atiixp.ko
+ kernel/drivers/ata/pata_hpt37x.ko
+ kernel/drivers/ata/pata_ninja32.ko
+ kernel/drivers/ata/ahci_platform.ko
+ kernel/drivers/ata/libahci.ko
+ kernel/drivers/ata/pata_artop.ko
+ kernel/drivers/ata/pdc_adma.ko
+ kernel/drivers/ata/pata_marvell.ko
+ kernel/drivers/ata/sata_promise.ko
+ kernel/drivers/ata/pata_oldpiix.ko
+ kernel/drivers/ata/pata_hpt366.ko
+ kernel/drivers/ata/sata_svw.ko
+ kernel/drivers/ata/pata_hpt3x3.ko
+ kernel/drivers/ata/pata_cmd64x.ko
+ kernel/drivers/ata/pata_sch.ko
+ kernel/drivers/ata/pata_sis.ko
+ kernel/drivers/ata/sata_sil.ko
+ kernel/drivers/ata/pata_it8213.ko
+ kernel/drivers/ata/pata_pdc202xx_old.ko
+ kernel/drivers/ata/pata_sil680.ko
+ kernel/drivers/ata/sata_mv.ko
+ kernel/drivers/ata/pata_rdc.ko
+ kernel/drivers/ata/pata_arasan_cf.ko
+ kernel/drivers/ata/sata_qstor.ko
+ kernel/drivers/ata/pata_atp867x.ko
+ kernel/drivers/ata/pata_piccolo.ko
+ kernel/drivers/ata/ahci.ko
+ kernel/drivers/ata/sata_sx4.ko
+ kernel/drivers/ata/libata.ko
+ kernel/drivers/ata/ata_generic.ko
+ kernel/drivers/ata/sata_sil24.ko
+ kernel/drivers/ata/sata_via.ko
+ kernel/drivers/ata/pata_netcell.ko
+ kernel/drivers/ata/pata_jmicron.ko
+ kernel/drivers/ata/sata_nv.ko
+ kernel/drivers/ata/pata_via.ko
+ kernel/drivers/ata/acard-ahci.ko
+ kernel/drivers/ata/sata_vsc.ko
+ kernel/drivers/ata/pata_hpt3x2n.ko
+ kernel/drivers/ata/sata_sis.ko
+ kernel/drivers/ata/sata_uli.ko
+ kernel/drivers/ata/pata_pdc2027x.ko
+ kernel/drivers/ata/ata_piix.ko
+ kernel/drivers/ata/pata_cs5536.ko
+ kernel/drivers/ata/pata_amd.ko
+ kernel/drivers/ata/pata_serverworks.ko
+"
diff --git a/remote/modules/gdisk/module.conf.centos b/remote/modules/gdisk/module.conf.centos
new file mode 100644
index 00000000..78fcd634
--- /dev/null
+++ b/remote/modules/gdisk/module.conf.centos
@@ -0,0 +1,5 @@
+REQUIRED_CONTENT_PACKAGES="
+ gdisk
+ xfsprogs
+ e2fsprogs
+"
diff --git a/remote/modules/pam-common-share/data/opt/openslx/scripts/pam_script_mount_common_share b/remote/modules/pam-common-share/data/opt/openslx/scripts/pam_script_mount_common_share
index 5ffb1205..85a3fcc0 100644
--- a/remote/modules/pam-common-share/data/opt/openslx/scripts/pam_script_mount_common_share
+++ b/remote/modules/pam-common-share/data/opt/openslx/scripts/pam_script_mount_common_share
@@ -3,59 +3,89 @@
# This script is a part of the pam_script_auth script
# and is not stand-alone!
#
-# It will try to mount the common share as specified in the
-# variables SLX_COMMON_SHARE_PATH and SLX_COMMON_SHARE_AUTH of
-# the global slx config '/opt/openslx/config'. Supported AUTH
-# are 'guest' and 'user'. First is self-explanatory, second
-# will use the user's credentials to authorize the mount.
+# It will try to mount the common shares specified in the
+# variables of the global slx config '/opt/openslx/config'.
+# A primary and a secondary share may be given. Every share
+# require following bundle of variables:
+#
+#
+# SLX_SHARE_[0-9]_AUTH_TYPE [guest|user|pam]
+# SLX_SHARE_[0-9]_AUTH_USER <username>
+# SLX_SHARE_[0-9]_AUTH_PASS <password>
+# SLX_SHARE_[0-9]_PERM [ro|rw]
+# SLX_SHARE_[0-9]_PATH <path_to_share>
#
# Example:
-# SLX_COMMON_SHARE_PATH='//windows.server/sharename'
-# SLX_COMMON_SHARE_AUTH='user'
+# SLX_SHARE_0_PATH='//windows.server/sharename'
+# SLX_SHARE_0_AUTH_TYPE='user'
+# SLX_SHARE_0_AUTH_USER='shareuser'
+# SLX_SHARE_0_AUTH_PASS='sharepass'
+# SLX_SHARE_0_PERM='rw'
#
+# Note: When AUTH_TYPE is set to 'pam' or 'guest',
+# no need to specify AUTH_USER or AUTH_PASS.
#
-
-mount_common_share() {
- # at this point we need the slx config to do anything
- [ -e "/opt/openslx/config" ] || \
- { slxlog "pam-share-noconfig" "File '/opt/openslx/config' not found."; return; }
-
- # we have it as we should, source it
- . /opt/openslx/config || \
- { slxlog "pam-share-sourceconfig" "Could not source '/opt/openslx/config'."; return; }
+#
+# usage: mount_share <auth_type> <auth_user> <auth_password> <permissions> <path> <share>
+mount_share() {
+ # only want two arguments
+ [ $# -ne 6 ] && { slxlog "pam-share-args" "Wrong number of arguments given! Need 6, $# given."; return; }
# lets check if we have our variables
- [ "x${SLX_COMMON_SHARE_PATH}" != "x" ] || \
- { slxlog "pam-share-noconfig" "No variable 'SLX_COMMON_SHARE_PATH' found in config!"; return; }
- [ "x${SLX_COMMON_SHARE_AUTH}" != "x" ] || \
- { slxlog "pam-share-noconfig" "No variable 'SLX_COMMON_SHARE_AUTH' found in config!"; return; }
-
+ local SHARE_AUTH_TYPE="$1"
+ local SHARE_AUTH_USER="$2"
+ local SHARE_AUTH_PASS="$3"
+ local SHARE_PERM="$4"
+ local SHARE_PATH="$5"
+ local SHARE_NUM="$6"
+
+ # unless specified otherwise, mount the share read-only
+ [ "x${SHARE_PERM}" != "xrw" ] && SHARE_PERM='ro'
+
# all good: now we can mount depending on the type
# supports: cifs?/nfs?
- if [ "${SLX_COMMON_SHARE_PATH:0:2}" = "//" ]; then
+ if [ "${SHARE_PATH:0:2}" = "//" ]; then
# '//' prefixed, assume windows share
# prepare common mount options for either authentication type
- MOUNT_OPTS="-t cifs -o nounix,uid=${USER_UID},gid=${USER_GID},forceuid,forcegid,nobrl,noacl"
+ MOUNT_OPTS="-t cifs -o nounix,uid=${USER_UID},gid=${USER_GID},forceuid,forcegid,nobrl,noacl,$SHARE_PERM"
# flag for failure
SIGNAL=$(mktemp)
rm -f -- "${SIGNAL}"
# output of command
MOUNT_OUTPUT=$(mktemp)
- # now see if the share needs credentials
- if [ "${SLX_COMMON_SHARE_AUTH}" = "guest" ]; then
+ # now construct the mount options depending on the type of the share.
+ if [ "${SHARE_AUTH_TYPE}" = "guest" ]; then
MOUNT_OPTS="${MOUNT_OPTS},guest,file_mode=0777,dir_mode=0777"
- elif [ "${SLX_COMMON_SHARE_AUTH}" = "user" ]; then
- export USER="{PAM_USER}"
- export PASSWD="{PAM_AUTHTOK}"
+ elif [ "${SHARE_AUTH_TYPE}" = "pam" ]; then
+ export USER="${PAM_USER}"
+ export PASSWD="${PAM_AUTHTOK}"
+ MOUNT_OPTS="${MOUNT_OPTS},sec=ntlm,file_mode=0700,dir_mode=0700"
+ elif [ "${SHARE_AUTH_TYPE}" = "user" ]; then
+ # check if credentials are set
+ [ ! -z "${SHARE_AUTH_USER}" ] || \
+ { slxlog "pam-share-noauthuser" "Share${SHARE_NUM}: No variable 'SLX_SHARE_${SHARE_NUM}_AUTH_USER' found in config!"; return; }
+ # now export them to the env
+ export USER="${SHARE_AUTH_USER}"
+ export PASSWD="${SHARE_AUTH_PASS}"
MOUNT_OPTS="${MOUNT_OPTS},sec=ntlm,file_mode=0700,dir_mode=0700"
else
- slxlog "pam-share-auth" "Auth type '${SLX_COMMON_SHARE_AUTH}' not supported."
+ slxlog "pam-share-auth" "Share${SHARE_NUM}: Auth type '${SHARE_AUTH_TYPE}' not supported."
return;
fi
+ # we just mount it to the directory with the same name as the
+ # last directory in the path name of the share
+ # e.g. //windows.net/lehrpool -> ${COMMON_SHARE_MOUNT_POINT}/lehrpool
+ local TARGET_DIR="${COMMON_SHARE_MOUNT_POINT}/$(basename ${SHARE_PATH})"
+ # it exists, so let's create ${COMMON_SHARE_MOUNT_POINT}/lehrpool_${SHARE_NUM}
+ [ -d "${TARGET_DIR}" ] && TARGET_DIR="${TARGET_DIR}_${SHARE_NUM}"
+
+ # at this point is TARGET_DIR pointing to the right directory.
+ mkdir -p "${TARGET_DIR}" || \
+ { slxlog "pam-share-mkdirfail" "Share${SHARE_NUM}: Could not create directory '${TARGET_DIR}'. Skipping share."; return; }
# now try to mount it
- ( mount ${MOUNT_OPTS} "${SLX_COMMON_SHARE_PATH}" "${COMMON_SHARE_MOUNT_POINT}" > "${MOUNT_OUTPUT}" 2>&1 || touch "${SIGNAL}" ) &
+ ( mount ${MOUNT_OPTS} "${SHARE_PATH}" "${TARGET_DIR}" > "${MOUNT_OUTPUT}" 2>&1 || touch "${SIGNAL}" ) &
MOUNT_PID=$!
for COUNTER in 1 1 2 4; do
kill -0 "${MOUNT_PID}" 2>/dev/null || break
@@ -64,10 +94,10 @@ mount_common_share() {
# check for failures
if [ -e "${SIGNAL}" ]; then
- slxlog "pam-share-mount" "Mount of '${SLX_COMMON_SHARE_PATH}' to '${COMMON_SHARE_MOUNT_POINT}' failed. (Args: ${MOUNT_OPTS}" "${MOUNT_OUTPUT}"
+ slxlog "pam-share-mount" "Mount of '${SHARE_PATH}' to '${TARGET_DIR}' failed. (Args: ${MOUNT_OPTS}" "${MOUNT_OUTPUT}"
rm -f -- "${SIGNAL}"
elif kill -9 "${MOUNT_PID}" 2>/dev/null; then
- slxlog "pam-share-mount" "Mount of '${SLX_COMMON_SHARE_PATH}' to '${COMMON_SHARE_MOUNT_POINT}' timed out. (Args: ${MOUNT_OPTS}" "${MOUNT_OUTPUT}"
+ slxlog "pam-share-mount" "Mount of '${SHARE_PATH}' to '${TARGET_DIR}' timed out. (Args: ${MOUNT_OPTS}" "${MOUNT_OUTPUT}"
fi
( sleep 2; rm -f -- "${MOUNT_OUTPUT}" ) &
@@ -75,8 +105,39 @@ mount_common_share() {
unset USER
unset PASSWD
fi
-
- # TODO support more than CIFS? NFS maybe?
}
-mount_common_share
+# at this point we need the slx config to do anything
+[ -e "/opt/openslx/config" ] || \
+ { slxlog "pam-share-noconfig" "File '/opt/openslx/config' not found."; return; }
+
+# we have it as we should, source it
+. /opt/openslx/config || \
+ { slxlog "pam-share-sourceconfig" "Could not source '/opt/openslx/config'."; return; }
+
+# Since many shares can be specified, we need to identify how many we have first.
+# We just go over all SLX_SHARE_* variables and check for those ending in _PATH
+# For each of those, a share was specified and we will try to mount it.
+for SHARE in ${!SLX_SHARE_*}; do
+ # skip if the variable doesn't end in _PATH
+ [[ "$SHARE" =~ .*_PATH$ ]] || continue
+ # first let's check if we have already mounted it, since we don't have to
+ # do anything is it already is.
+ if mount | grep -q "${SHARE}"; then
+ # already mounted, just skip.
+ continue
+ fi
+ # ok so we have a path in $SHARE, let's extract the number of the share
+ # i.e. SLX_SHARE_0_PATH -> share number 0
+ # first strip the leading SLX_SHARE_
+ SHARE=${SHARE#SLX_SHARE_}
+ # now remove the trailing _PATH
+ SHARE=${SHARE%_PATH}
+ # now it should be a number, TODO accept more than numbers? Doesn't really matter...
+ # this check is mostly to be sure that the variable splitting worked as it should
+ [[ "$SHARE" =~ ^[0-9]+$ ]] || continue
+ eval mount_share \""\$SLX_SHARE_${SHARE}_AUTH_TYPE"\" \""\$SLX_SHARE_${SHARE}_AUTH_USER"\" \""\$SLX_SHARE_${SHARE}_AUTH_PASS"\" \""\$SLX_SHARE_${SHARE}_PERM"\" \""\$SLX_SHARE_${SHARE}_PATH"\" \""$SHARE"\"
+ ## unset USER and PASSWD just in case mount_share returned due to an error.
+ unset USER
+ unset PASSWD
+done
diff --git a/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth b/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth
index e7de3a8c..3b8bf676 100755
--- a/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth
+++ b/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth
@@ -17,6 +17,19 @@ TEMP_HOME_DIR="$USER_HOME"
# check if PAM_USER is root and skip if it is the case
[ "x${PAM_USER}" == "xroot" ] && exit 0
+# source the stuff in pam_script_auth.d, if it exists
+if [ -d "/opt/openslx/scripts/pam_script_auth.d" ]; then
+ for HOOK in $(ls "/opt/openslx/scripts/pam_script_auth.d"); do
+ # source it, in case of failure do nothing since these scripts are non-critical
+ . "/opt/openslx/scripts/pam_script_auth.d/$HOOK" || slxlog "pam-source-hooks" "Could not source '$HOOK'."
+ done
+fi
+
+###############################################################################
+#
+# Preparations for volatile /home/<user>
+#
+#
# check if we already mounted the home directory
mount | grep -q " $TEMP_HOME_DIR " && exit 0
@@ -92,7 +105,7 @@ chown "${PAM_USER}:${USER_GID}" "${COMMON_SHARE_MOUNT_POINT}" || \
[ ! -e "${COMMON_SHARE_MOUNT_SCRIPT}" ] && exit 0
# we do!
-. "${COMMON_SHARE_MOUNT_SCRIPT}" || \
+COMMON_SHARE_MOUNT_POINT="${COMMON_SHARE_MOUNT_POINT}" PAM_USER="${PAM_USER}" PAM_AUTHTOK="${PAM_AUTHTOK}" USER_UID="${USER_UID}" USER_GID="${USER_GID}" /bin/bash "${COMMON_SHARE_MOUNT_SCRIPT}" || \
{ slxlog "pam-global-sourceshare" "Could not source '${COMMON_SHARE_MOUNT_SCRIPT}'."; exit 1; }
# Just try to delete the common share dir. If the mount was successful, it will not work
diff --git a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close
index 0af71c6f..4fc2ce6a 100755
--- a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close
+++ b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close
@@ -18,6 +18,14 @@ fi
# can only work if script is run as root
[ "x$(whoami)" = "xroot" ] || exit 0
+# source hooks if there are any
+if [ -d "/opt/openslx/scripts/pam_script_ses_close.d" ]; then
+ for HOOK in $(ls "/opt/openslx/scripts/pam_script_ses_close.d"); do
+ # failure is non-critical
+ . "/opt/openslx/scripts/pam_script_ses_close.d/$HOOK" || slxlog "pam-sesclose-hooks" "Could not source '$HOOK'."
+ done
+fi
+
OPENSESSION=$(loginctl show-user "$PAM_USER" | grep "Sessions=" | cut -c 10-)
SESSIONCOUNT=$(echo "$OPENSESSION" | wc -w)
# When using su/sudo there is no session created, so count up by one
diff --git a/server/modules/pvs2mgr-freiburg/opt/openslx/scripts/setup-pvsmgr b/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr
index dedb0995..dedb0995 100755
--- a/server/modules/pvs2mgr-freiburg/opt/openslx/scripts/setup-pvsmgr
+++ b/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr
diff --git a/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient b/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient
index bef2449b..7b28889d 100644..100755
--- a/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient
+++ b/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient
@@ -2,9 +2,8 @@
# If the ENV var PVS has been set by vmchooser start pvsclient
if [ -n "$PVS_AUTO_CONNECT" -a "$PVS_AUTO_CONNECT" == "TRUE" ]; then
- pvsclient --auto &
- else
- pvsclient &
- fi
+ pvsclient --auto &
+else
+ pvsclient &
fi
-
+exit 0
diff --git a/server/modules/pvs2mgr-freiburg/opt/openslx/xsessions/default.desktop b/remote/modules/pvs2/data/opt/openslx/xsessions/pvs2mgr.desktop
index b718716a..dbe80eb3 100755
--- a/server/modules/pvs2mgr-freiburg/opt/openslx/xsessions/default.desktop
+++ b/remote/modules/pvs2/data/opt/openslx/xsessions/pvs2mgr.desktop
@@ -1,9 +1,7 @@
[Desktop Entry]
Encoding=UTF-8
-Name=PVS MNGR
-Name[de]=PVS
-Comment=PVS TEST
-Comment[de]=PVS TEST
+Name=PVS Steuerkonsole
+Name[de]=PVS Steuerkonsole
Exec=/opt/openslx/scripts/setup-pvsmgr
TryExec=/opt/openslx/bin/pvsmgr
Icon=
diff --git a/remote/modules/pvs2/data/usr/share/xsessions/pvs2mgr.desktop b/remote/modules/pvs2/data/usr/share/xsessions/pvs2mgr.desktop
new file mode 100755
index 00000000..3cd1be2c
--- /dev/null
+++ b/remote/modules/pvs2/data/usr/share/xsessions/pvs2mgr.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=PVS Steuerkonsole
+Exec=/opt/openslx/scripts/setup-pvsmgr
+TryExec=/opt/openslx/bin/pvsmgr
+Icon=
+Type=Application
diff --git a/remote/modules/systemd-distro/README b/remote/modules/systemd-distro/README
new file mode 100644
index 00000000..f84283d8
--- /dev/null
+++ b/remote/modules/systemd-distro/README
@@ -0,0 +1,12 @@
+To activate debug level, add to units under [Service] this line
+Environment=SYSTEMD_LOG_LEVEL=debug
+
+Note on systemd-versions: Some systemds below 204 (verified in
+systemd-195) seem to need libpci-dev (or the openSuse equivalent).
+
+
+Another note on our compiled systemd-udevd:
+So far it has not been possible to reach a fully functional udev
+system in view of the perceived systemd-udevd limitation about
+evaluating the variable ENV{DEVTYPE}=="usb_device" in udev rule
+scripts.
diff --git a/remote/modules/systemd-distro/TODO b/remote/modules/systemd-distro/TODO
new file mode 100644
index 00000000..4b17eb88
--- /dev/null
+++ b/remote/modules/systemd-distro/TODO
@@ -0,0 +1,2 @@
+libkmod: libkmod gets installed systemwide at present. This should not
+ be the case.
diff --git a/remote/modules/systemd-distro/data/etc/systemd/system.conf b/remote/modules/systemd-distro/data/etc/systemd/system.conf
new file mode 100644
index 00000000..583f1b7d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/etc/systemd/system.conf
@@ -0,0 +1,49 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# See systemd-system.conf(5) for details
+
+[Manager]
+#LogLevel=info
+#LogTarget=journal-or-kmsg
+#LogColor=yes
+#LogLocation=no
+#DumpCore=yes
+#CrashShell=no
+#ShowStatus=yes
+#CrashChVT=1
+#CPUAffinity=1 2
+#JoinControllers=cpu,cpuacct net_cls,net_prio
+#RuntimeWatchdogSec=0
+#ShutdownWatchdogSec=10min
+#CapabilityBoundingSet=
+#SystemCallArchitectures=
+#TimerSlackNSec=
+#DefaultStandardOutput=journal
+#DefaultStandardError=inherit
+#DefaultTimeoutStartSec=90s
+#DefaultTimeoutStopSec=90s
+#DefaultRestartSec=100ms
+#DefaultStartLimitInterval=10s
+#DefaultStartLimitBurst=5
+DefaultEnvironment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/openslx/sbin:/opt/openslx/bin"
+#DefaultLimitCPU=
+#DefaultLimitFSIZE=
+#DefaultLimitDATA=
+#DefaultLimitSTACK=
+#DefaultLimitCORE=
+#DefaultLimitRSS=
+#DefaultLimitNOFILE=
+#DefaultLimitAS=
+#DefaultLimitNPROC=
+#DefaultLimitMEMLOCK=
+#DefaultLimitLOCKS=
+#DefaultLimitSIGPENDING=
+#DefaultLimitMSGQUEUE=
+#DefaultLimitNICE=
+#DefaultLimitRTPRIO=
+#DefaultLimitRTTIME=
diff --git a/remote/modules/systemd-distro/data/etc/systemd/system/network-interface@.service b/remote/modules/systemd-distro/data/etc/systemd/system/network-interface@.service
new file mode 100644
index 00000000..ea9cc56e
--- /dev/null
+++ b/remote/modules/systemd-distro/data/etc/systemd/system/network-interface@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Brings interface %i up
+Wants=dhcpc@%i.service
+Before=dhcpc@%i.service
+
+[Service]
+Type=simple
+ExecStart=/opt/openslx/sbin/ip link set dev %I up
+
diff --git a/remote/modules/systemd-distro/data/etc/systemd/system/systemd-halt.service b/remote/modules/systemd-distro/data/etc/systemd/system/systemd-halt.service
new file mode 100644
index 00000000..95b4f284
--- /dev/null
+++ b/remote/modules/systemd-distro/data/etc/systemd/system/systemd-halt.service
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Halt
+Documentation=man:systemd-halt.service(8)
+DefaultDependencies=no
+Requires=shutdown.target final.target
+After=shutdown.target final.target
+
+[Service]
+Type=oneshot
+ExecStartPre=-/bin/bash -c /opt/openslx/scripts/systemd-shutdown_prescript
+ExecStart=/usr/bin/systemctl --force halt
diff --git a/remote/modules/systemd-distro/data/etc/systemd/system/systemd-poweroff.service b/remote/modules/systemd-distro/data/etc/systemd/system/systemd-poweroff.service
new file mode 100644
index 00000000..8b96980e
--- /dev/null
+++ b/remote/modules/systemd-distro/data/etc/systemd/system/systemd-poweroff.service
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Power-Off
+Documentation=man:systemd-halt.service(8)
+DefaultDependencies=no
+Requires=shutdown.target final.target
+After=shutdown.target final.target
+
+[Service]
+Type=oneshot
+ExecStartPre=-/bin/bash -c /opt/openslx/scripts/systemd-shutdown_prescript
+ExecStart=/usr/bin/systemctl --force poweroff
diff --git a/remote/modules/systemd-distro/data/etc/systemd/system/systemd-reboot.service b/remote/modules/systemd-distro/data/etc/systemd/system/systemd-reboot.service
new file mode 100644
index 00000000..be4d608c
--- /dev/null
+++ b/remote/modules/systemd-distro/data/etc/systemd/system/systemd-reboot.service
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Reboot
+Documentation=man:systemd-halt.service(8)
+DefaultDependencies=no
+Requires=shutdown.target final.target
+After=shutdown.target final.target
+
+[Service]
+Type=oneshot
+ExecStartPre=-/bin/bash -c /opt/openslx/scripts/systemd-shutdown_prescript
+ExecStart=/usr/bin/systemctl --force reboot
diff --git a/remote/modules/systemd-distro/data/opt/openslx/scripts/systemd-shutdown_prescript b/remote/modules/systemd-distro/data/opt/openslx/scripts/systemd-shutdown_prescript
new file mode 100755
index 00000000..3b5d7f92
--- /dev/null
+++ b/remote/modules/systemd-distro/data/opt/openslx/scripts/systemd-shutdown_prescript
@@ -0,0 +1,50 @@
+#!/bin/ash
+
+# This script gets called by ExecStartPre from the services
+# systemd-halt, systemd-poweroff, systemd-reboot. Pre-shutdown actions as
+# unmounting nfs shares etc. should go here.
+
+PATH=/bin:/usr/bin:/opt/openslx/bin
+
+# kill leftover processes
+
+umount_nfs_shares() {
+ for i in "$(mount | grep 'type nfs')"; do
+ share=$(echo "$i"|cut -f 3 -d " ")
+ echo "Unmounte nfs-Share $share ...."
+ umount "$share"
+ ERROR=$?
+ if [ $ERROR -eq 0 ]; then
+ echo "nfs-Share $share unmounted."
+ else
+ echo "Could not umount nfs share $share!"
+ ERRORLEVEL=1
+ fi
+ done
+}
+
+umount_samba_shares() {
+ for i in "$(mount | grep 'type cifs')"; do
+ share=$(echo $i|cut -f 3 -d " ")
+ echo "Unmounte cifs-Share $share ...."
+ umount "$share"
+ ERROR=$?
+ if [ $ERROR -eq 0 ]; then
+ echo "cifs-Share $share unmounted."
+ else
+ echo "Could not umount cifs share $share!"
+ ERRORLEVEL=1
+ fi
+ done
+}
+
+# Searching for nfs-shares in mtab:
+if [ $(echo /etc/mtab | cut -d " " -f 3 | grep -q nfs) ]; then
+ umount_nfs_shares
+fi
+
+# Searching for samba-shares:
+if [ $(echo /etc/mtab|cut -d " " -f 3 | grep -q cifs) ]; then
+ umount_samba_shares
+fi
+exit $ERRORLEVEL
diff --git a/remote/modules/systemd-distro/data/sbin/halt b/remote/modules/systemd-distro/data/sbin/halt
new file mode 100755
index 00000000..994bdf14
--- /dev/null
+++ b/remote/modules/systemd-distro/data/sbin/halt
Binary files differ
diff --git a/remote/modules/systemd-distro/data/sbin/init b/remote/modules/systemd-distro/data/sbin/init
new file mode 100755
index 00000000..a18235ca
--- /dev/null
+++ b/remote/modules/systemd-distro/data/sbin/init
Binary files differ
diff --git a/remote/modules/systemd-distro/data/sbin/poweroff b/remote/modules/systemd-distro/data/sbin/poweroff
new file mode 100755
index 00000000..994bdf14
--- /dev/null
+++ b/remote/modules/systemd-distro/data/sbin/poweroff
Binary files differ
diff --git a/remote/modules/systemd-distro/data/sbin/reboot b/remote/modules/systemd-distro/data/sbin/reboot
new file mode 100755
index 00000000..994bdf14
--- /dev/null
+++ b/remote/modules/systemd-distro/data/sbin/reboot
Binary files differ
diff --git a/remote/modules/systemd-distro/data/sbin/runlevel b/remote/modules/systemd-distro/data/sbin/runlevel
new file mode 100755
index 00000000..994bdf14
--- /dev/null
+++ b/remote/modules/systemd-distro/data/sbin/runlevel
Binary files differ
diff --git a/remote/modules/systemd-distro/data/sbin/shutdown b/remote/modules/systemd-distro/data/sbin/shutdown
new file mode 100755
index 00000000..994bdf14
--- /dev/null
+++ b/remote/modules/systemd-distro/data/sbin/shutdown
Binary files differ
diff --git a/remote/modules/systemd-distro/data/sbin/telinit b/remote/modules/systemd-distro/data/sbin/telinit
new file mode 100755
index 00000000..994bdf14
--- /dev/null
+++ b/remote/modules/systemd-distro/data/sbin/telinit
Binary files differ
diff --git a/remote/modules/systemd-distro/data/usr/lib/sysctl.d/50-default.conf b/remote/modules/systemd-distro/data/usr/lib/sysctl.d/50-default.conf
new file mode 100644
index 00000000..6ece04ce
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/sysctl.d/50-default.conf
@@ -0,0 +1,39 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# See sysctl.d(5) and core(5) for for details.
+
+# System Request functionality of the kernel (SYNC)
+kernel.sysrq = 1
+
+# Append the PID to the core filename
+kernel.core_uses_pid = 1
+
+# Source route verification
+net.ipv4.conf.all.rp_filter = 1
+# Do not accept source routing
+net.ipv4.conf.all.accept_source_route = 0
+# protection from the SYN flood attack
+net.ipv4.tcp_syncookies = 1
+# timestamps add a little overhead but are recommended for gbit links
+net.ipv4.tcp_timestamps = 1
+# ignore echo broadcast requests to prevent being part of smurf attacks
+net.ipv4.icmp_echo_ignore_broadcasts = 1
+# ignore bogus icmp errors
+net.ipv4.icmp_ignore_bogus_error_responses = 1
+# send redirects (not a router, disable it)
+net.ipv4.conf.all.send_redirects = 0
+# ICMP routing redirects (only secure)
+net.ipv4.conf.all.accept_redirects = 0
+net.ipv4.conf.all.secure_redirects = 1
+
+# Enable hard and soft link protection
+fs.protected_hardlinks = 1
+fs.protected_symlinks = 1
+
+# A little extra security for local exploits
+kernel.kptr_restrict = 1
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/autovt@.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/autovt@.service
new file mode 100644
index 00000000..2d2940e1
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/autovt@.service
@@ -0,0 +1,49 @@
+# This file is part of systemd.
+# Patched for OpenSLX
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Getty on %I
+Documentation=man:agetty(8) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
+After=systemd-user-sessions.service
+After=rc-local.service
+
+# If additional gettys are spawned during boot then we should make
+# sure that this is synchronized before getty.target, even though
+# getty.target didn't actually pull it in.
+Before=getty.target
+IgnoreOnIsolate=yes
+
+# On systems without virtual consoles, don't start any getty. (Note
+# that serial gettys are covered by serial-getty@.service, not this
+# unit
+ConditionPathExists=/dev/tty0
+
+[Service]
+ExecStartPre=-/opt/openslx/bin/killall fbsplash
+# the VT is cleared by TTYVTDisallocate
+ExecStart=-/sbin/agetty --noclear %I 38400 linux
+Type=idle
+Restart=always
+RestartSec=0
+UtmpIdentifier=%I
+TTYPath=/dev/%I
+TTYReset=yes
+TTYVHangup=yes
+TTYVTDisallocate=no
+KillMode=process
+IgnoreSIGPIPE=no
+
+# Unset locale for the console getty since the console has problems
+# displaying some internationalized messages.
+Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
+
+# Some login implementations ignore SIGTERM, so we send SIGHUP
+# instead, to ensure that login terminates cleanly.
+KillSignal=SIGHUP
+
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/basic.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/basic.target
new file mode 100644
index 00000000..6b9cfe4c
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/basic.target
@@ -0,0 +1,14 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Basic System
+Documentation=man:systemd.special(7)
+Requires=sysinit.target
+Wants=sockets.target timers.target paths.target
+After=sysinit.target sockets.target timers.target paths.target
+RefuseManualStart=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/bluetooth.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/bluetooth.target
new file mode 100644
index 00000000..dd4ae14c
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/bluetooth.target
@@ -0,0 +1,11 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Bluetooth
+Documentation=man:systemd.special(7)
+StopWhenUnneeded=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/console-getty.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/console-getty.service
new file mode 100644
index 00000000..74a220e2
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/console-getty.service
@@ -0,0 +1,32 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Console Getty
+Documentation=man:agetty(8)
+After=systemd-user-sessions.service plymouth-quit-wait.service
+After=rc-local.service
+Before=getty.target
+
+[Service]
+ExecStart=-/sbin/agetty --noclear -s console 115200,38400,9600
+Type=idle
+Restart=always
+RestartSec=0
+UtmpIdentifier=cons
+TTYPath=/dev/console
+TTYReset=yes
+TTYVHangup=yes
+KillMode=process
+IgnoreSIGPIPE=no
+
+# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
+# terminates cleanly.
+KillSignal=SIGHUP
+
+[Install]
+WantedBy=getty.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/console-shell.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/console-shell.service
new file mode 100644
index 00000000..c1548299
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/console-shell.service
@@ -0,0 +1,32 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Console Shell
+Documentation=man:sulogin(8)
+After=systemd-user-sessions.service plymouth-quit-wait.service
+After=rc-local.service
+Before=getty.target
+
+[Service]
+Environment=HOME=/root
+WorkingDirectory=/root
+ExecStart=-/sbin/sulogin
+ExecStopPost=-/usr/bin/systemctl poweroff
+Type=idle
+StandardInput=tty-force
+StandardOutput=inherit
+StandardError=inherit
+KillMode=process
+IgnoreSIGPIPE=no
+
+# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
+# terminates cleanly.
+KillSignal=SIGHUP
+
+[Install]
+WantedBy=getty.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/ctrl-alt-del.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/ctrl-alt-del.target
new file mode 100644
index 00000000..dec8f567
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/ctrl-alt-del.target
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Reboot
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+Requires=systemd-reboot.service
+After=systemd-reboot.service
+AllowIsolate=yes
+
+[Install]
+Alias=ctrl-alt-del.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/dbus-org.freedesktop.login1.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/dbus-org.freedesktop.login1.service
new file mode 100644
index 00000000..71971e44
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/dbus-org.freedesktop.login1.service
@@ -0,0 +1,23 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Login Service
+Documentation=man:systemd-logind.service(8) man:logind.conf(5)
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/multiseat
+After=
+
+[Service]
+ExecStart=/usr/lib/systemd/systemd-logind
+Restart=always
+RestartSec=0
+BusName=org.freedesktop.login1
+CapabilityBoundingSet=CAP_AUDIT_CONTROL CAP_CHOWN CAP_KILL CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER CAP_SYS_TTY_CONFIG
+
+# Increase the default a bit in order to allow many simultaneous
+# logins since we keep one fd open per session.
+LimitNOFILE=16384
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/debug-shell.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/debug-shell.service
new file mode 100644
index 00000000..4220d7c2
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/debug-shell.service
@@ -0,0 +1,33 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Early root shell on /dev/tty9 FOR DEBUGGING ONLY
+Documentation=man:sushell(8)
+DefaultDependencies=no
+IgnoreOnIsolate=yes
+
+[Service]
+Environment=TERM=linux
+ExecStart=/bin/ash
+Restart=always
+RestartSec=0
+StandardInput=tty
+TTYPath=/dev/tty9
+TTYReset=yes
+TTYVHangup=yes
+KillMode=process
+IgnoreSIGPIPE=no
+# bash ignores SIGTERM
+KillSignal=SIGHUP
+
+# Unset locale for the console getty since the console has problems
+# displaying some internationalized messages.
+Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
+
+[Install]
+WantedBy=sysinit.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/default.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/default.target
new file mode 100644
index 00000000..65f2521d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/default.target
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Graphical Interface
+Documentation=man:systemd.special(7)
+Requires=multi-user.target
+After=multi-user.target
+Conflicts=rescue.target
+Wants=display-manager.service
+AllowIsolate=yes
+
+[Install]
+Alias=default.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/dev-hugepages.mount b/remote/modules/systemd-distro/data/usr/lib/systemd/system/dev-hugepages.mount
new file mode 100644
index 00000000..d711faed
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/dev-hugepages.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Huge Pages File System
+Documentation=https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+DefaultDependencies=no
+Before=sysinit.target
+ConditionPathExists=/sys/kernel/mm/hugepages
+
+[Mount]
+What=hugetlbfs
+Where=/dev/hugepages
+Type=hugetlbfs
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/dev-mqueue.mount b/remote/modules/systemd-distro/data/usr/lib/systemd/system/dev-mqueue.mount
new file mode 100644
index 00000000..5c11ca7d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/dev-mqueue.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=POSIX Message Queue File System
+Documentation=man:mq_overview(7)
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+DefaultDependencies=no
+Before=sysinit.target
+ConditionPathExists=/proc/sys/fs/mqueue
+
+[Mount]
+What=mqueue
+Where=/dev/mqueue
+Type=mqueue
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/emergency.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/emergency.service
new file mode 100644
index 00000000..72fcff2d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/emergency.service
@@ -0,0 +1,31 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Emergency Shell
+Documentation=man:sulogin(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+Before=shutdown.target
+
+[Service]
+Environment=HOME=/root
+WorkingDirectory=/root
+ExecStartPre=-/bin/plymouth quit
+ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
+ExecStart=-/sbin/sulogin
+ExecStopPost=/usr/bin/systemctl --fail --no-block default
+Type=idle
+StandardInput=tty-force
+StandardOutput=inherit
+StandardError=inherit
+KillMode=process
+IgnoreSIGPIPE=no
+
+# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
+# terminates cleanly.
+KillSignal=SIGHUP
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/emergency.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/emergency.target
new file mode 100644
index 00000000..0760d66f
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/emergency.target
@@ -0,0 +1,13 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Emergency Mode
+Documentation=man:systemd.special(7)
+Requires=emergency.service
+After=emergency.service
+AllowIsolate=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/final.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/final.target
new file mode 100644
index 00000000..c7cf18e0
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/final.target
@@ -0,0 +1,13 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Final Step
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+RefuseManualStart=yes
+After=shutdown.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/getty.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/getty.target
new file mode 100644
index 00000000..c33d4465
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/getty.target
@@ -0,0 +1,11 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Login Prompts
+Documentation=man:systemd.special(7) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/getty@.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/getty@.service
new file mode 100644
index 00000000..2d2940e1
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/getty@.service
@@ -0,0 +1,49 @@
+# This file is part of systemd.
+# Patched for OpenSLX
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Getty on %I
+Documentation=man:agetty(8) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
+After=systemd-user-sessions.service
+After=rc-local.service
+
+# If additional gettys are spawned during boot then we should make
+# sure that this is synchronized before getty.target, even though
+# getty.target didn't actually pull it in.
+Before=getty.target
+IgnoreOnIsolate=yes
+
+# On systems without virtual consoles, don't start any getty. (Note
+# that serial gettys are covered by serial-getty@.service, not this
+# unit
+ConditionPathExists=/dev/tty0
+
+[Service]
+ExecStartPre=-/opt/openslx/bin/killall fbsplash
+# the VT is cleared by TTYVTDisallocate
+ExecStart=-/sbin/agetty --noclear %I 38400 linux
+Type=idle
+Restart=always
+RestartSec=0
+UtmpIdentifier=%I
+TTYPath=/dev/%I
+TTYReset=yes
+TTYVHangup=yes
+TTYVTDisallocate=no
+KillMode=process
+IgnoreSIGPIPE=no
+
+# Unset locale for the console getty since the console has problems
+# displaying some internationalized messages.
+Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
+
+# Some login implementations ignore SIGTERM, so we send SIGHUP
+# instead, to ensure that login terminates cleanly.
+KillSignal=SIGHUP
+
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/graphical.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/graphical.target
new file mode 100644
index 00000000..65f2521d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/graphical.target
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Graphical Interface
+Documentation=man:systemd.special(7)
+Requires=multi-user.target
+After=multi-user.target
+Conflicts=rescue.target
+Wants=display-manager.service
+AllowIsolate=yes
+
+[Install]
+Alias=default.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/halt-local.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/halt-local.service
new file mode 100644
index 00000000..e6243eeb
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/halt-local.service
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=/usr/sbin/halt.local Compatibility
+ConditionFileIsExecutable=/usr/sbin/halt.local
+DefaultDependencies=no
+After=shutdown.target
+Before=final.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/halt.local
+TimeoutSec=0
+StandardOutput=tty
+RemainAfterExit=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/halt.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/halt.target
new file mode 100644
index 00000000..a21d984b
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/halt.target
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Halt
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+Requires=systemd-halt.service
+After=systemd-halt.service
+AllowIsolate=yes
+
+[Install]
+Alias=ctrl-alt-del.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/hibernate.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/hibernate.target
new file mode 100644
index 00000000..143eb592
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/hibernate.target
@@ -0,0 +1,13 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Hibernate
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+BindsTo=systemd-hibernate.service
+After=systemd-hibernate.service
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/hybrid-sleep.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/hybrid-sleep.target
new file mode 100644
index 00000000..d2d34092
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/hybrid-sleep.target
@@ -0,0 +1,13 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Hybrid Suspend+Hibernate
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+BindsTo=systemd-hybrid-sleep.service
+After=systemd-hybrid-sleep.service
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/kexec.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/kexec.target
new file mode 100644
index 00000000..90795d0c
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/kexec.target
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Reboot via kexec
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+Requires=systemd-kexec.service
+After=systemd-kexec.service
+AllowIsolate=yes
+
+[Install]
+Alias=ctrl-alt-del.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target
new file mode 100644
index 00000000..998e0460
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Multi-User System
+Documentation=man:systemd.special(7)
+Requires=basic.target
+Conflicts=rescue.service rescue.target
+After=basic.target rescue.service rescue.target
+AllowIsolate=yes
+
+[Install]
+Alias=default.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/getty.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/getty.target
new file mode 100644
index 00000000..c33d4465
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/getty.target
@@ -0,0 +1,11 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Login Prompts
+Documentation=man:systemd.special(7) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/systemd-logind.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/systemd-logind.service
new file mode 100644
index 00000000..71971e44
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/systemd-logind.service
@@ -0,0 +1,23 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Login Service
+Documentation=man:systemd-logind.service(8) man:logind.conf(5)
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/multiseat
+After=
+
+[Service]
+ExecStart=/usr/lib/systemd/systemd-logind
+Restart=always
+RestartSec=0
+BusName=org.freedesktop.login1
+CapabilityBoundingSet=CAP_AUDIT_CONTROL CAP_CHOWN CAP_KILL CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER CAP_SYS_TTY_CONFIG
+
+# Increase the default a bit in order to allow many simultaneous
+# logins since we keep one fd open per session.
+LimitNOFILE=16384
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/systemd-user-sessions.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/systemd-user-sessions.service
new file mode 100644
index 00000000..9226e3ea
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/multi-user.target.wants/systemd-user-sessions.service
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Permit User Sessions
+Documentation=man:systemd-user-sessions.service(8)
+After=
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/systemd-user-sessions start
+ExecStop=/usr/lib/systemd/systemd-user-sessions stop
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/network-online.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/network-online.target
new file mode 100644
index 00000000..a40c44c9
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/network-online.target
@@ -0,0 +1,11 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Network is Online
+Documentation=man:systemd.special(7)
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/network.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/network.target
new file mode 100644
index 00000000..4186c088
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/network.target
@@ -0,0 +1,14 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Network
+Documentation=man:systemd.special(7)
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
+DefaultDependencies=no
+ConditionPathExists=/run/network/network-ready
+
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/paths.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/paths.target
new file mode 100644
index 00000000..25c7fd03
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/paths.target
@@ -0,0 +1,10 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Paths
+Documentation=man:systemd.special(7)
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/poweroff.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/poweroff.target
new file mode 100644
index 00000000..71871033
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/poweroff.target
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Power-Off
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+Requires=systemd-poweroff.service
+After=systemd-poweroff.service
+AllowIsolate=yes
+
+[Install]
+Alias=ctrl-alt-del.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/printer.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/printer.target
new file mode 100644
index 00000000..a6b86caa
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/printer.target
@@ -0,0 +1,11 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Printer
+Documentation=man:systemd.special(7)
+StopWhenUnneeded=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/proc-sys-fs-binfmt_misc.automount b/remote/modules/systemd-distro/data/usr/lib/systemd/system/proc-sys-fs-binfmt_misc.automount
new file mode 100644
index 00000000..6be38937
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/proc-sys-fs-binfmt_misc.automount
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Arbitrary Executable File Formats File System Automount Point
+Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+DefaultDependencies=no
+Before=sysinit.target
+ConditionPathExists=/proc/sys/fs/binfmt_misc/
+ConditionPathIsReadWrite=/proc/sys/
+
+[Automount]
+Where=/proc/sys/fs/binfmt_misc
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/proc-sys-fs-binfmt_misc.mount b/remote/modules/systemd-distro/data/usr/lib/systemd/system/proc-sys-fs-binfmt_misc.mount
new file mode 100644
index 00000000..8c7c3863
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/proc-sys-fs-binfmt_misc.mount
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Arbitrary Executable File Formats File System
+Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+DefaultDependencies=no
+
+[Mount]
+What=binfmt_misc
+Where=/proc/sys/fs/binfmt_misc
+Type=binfmt_misc
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/rc-local.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/rc-local.service
new file mode 100644
index 00000000..cb9c1ba2
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/rc-local.service
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# This unit gets pulled automatically into multi-user.target by
+# systemd-rc-local-generator if /etc/rc.local is executable.
+[Unit]
+Description=/etc/rc.local Compatibility
+ConditionFileIsExecutable=/etc/rc.local
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/etc/rc.local start
+TimeoutSec=0
+RemainAfterExit=yes
+SysVStartPriority=99
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/reboot.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/reboot.target
new file mode 100644
index 00000000..dec8f567
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/reboot.target
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Reboot
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+Requires=systemd-reboot.service
+After=systemd-reboot.service
+AllowIsolate=yes
+
+[Install]
+Alias=ctrl-alt-del.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/remote-fs.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/remote-fs.target
new file mode 100644
index 00000000..0821987d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/remote-fs.target
@@ -0,0 +1,3 @@
+[Unit]
+Description=Remote File Systems Impostor
+
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/serial-getty@.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/serial-getty@.service
new file mode 100644
index 00000000..5f289500
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/serial-getty@.service
@@ -0,0 +1,36 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Serial Getty on %I
+Documentation=man:agetty(8) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
+BindsTo=dev-%i.device
+After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
+After=rc-local.service
+
+# If additional gettys are spawned during boot then we should make
+# sure that this is synchronized before getty.target, even though
+# getty.target didn't actually pull it in.
+Before=getty.target
+IgnoreOnIsolate=yes
+
+[Service]
+ExecStart=-/sbin/agetty -s %I 115200,38400,9600 vt102
+Type=idle
+Restart=always
+RestartSec=0
+UtmpIdentifier=%I
+TTYPath=/dev/%I
+TTYReset=yes
+TTYVHangup=yes
+KillMode=process
+IgnoreSIGPIPE=no
+
+# Some login implementations ignore SIGTERM, so we send SIGHUP
+# instead, to ensure that login terminates cleanly.
+KillSignal=SIGHUP
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/shutdown.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/shutdown.target
new file mode 100644
index 00000000..73e302b8
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/shutdown.target
@@ -0,0 +1,12 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Shutdown
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+RefuseManualStart=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sigpwr.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sigpwr.target
new file mode 100644
index 00000000..a52e7cff
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sigpwr.target
@@ -0,0 +1,10 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Power Failure
+Documentation=man:systemd.special(7)
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sleep.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sleep.target
new file mode 100644
index 00000000..10c7c8d5
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sleep.target
@@ -0,0 +1,13 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Sleep
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+RefuseManualStart=yes
+StopWhenUnneeded=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/smartcard.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/smartcard.target
new file mode 100644
index 00000000..5fefe847
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/smartcard.target
@@ -0,0 +1,11 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Smart Card
+Documentation=man:systemd.special(7)
+StopWhenUnneeded=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target
new file mode 100644
index 00000000..26ab065d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target
@@ -0,0 +1,10 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Sockets
+Documentation=man:systemd.special(7)
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-journald.socket b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-journald.socket
new file mode 100644
index 00000000..4f0619d2
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-journald.socket
@@ -0,0 +1,26 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Journal Socket
+Documentation=man:systemd-journald.service(8) man:journald.conf(5)
+DefaultDependencies=no
+Before=sockets.target
+
+# Mount and swap units need this. If this socket unit is removed by an
+# isolate request the mount and and swap units would be removed too,
+# hence let's exclude this from isolate requests.
+IgnoreOnIsolate=yes
+
+[Socket]
+ListenStream=/run/systemd/journal/stdout
+ListenDatagram=/run/systemd/journal/socket
+ListenDatagram=/dev/log
+SocketMode=0666
+PassCredentials=yes
+PassSecurity=yes
+ReceiveBuffer=8M
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-shutdownd.socket b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-shutdownd.socket
new file mode 100644
index 00000000..9421ce8a
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-shutdownd.socket
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Delayed Shutdown Socket
+Documentation=man:systemd-shutdownd.service(8)
+DefaultDependencies=no
+Before=sockets.target
+
+[Socket]
+ListenDatagram=/run/systemd/shutdownd
+SocketMode=0600
+PassCredentials=yes
+PassSecurity=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-udevd-control.socket b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-udevd-control.socket
new file mode 100644
index 00000000..ca17102d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-udevd-control.socket
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=udev Control Socket
+Documentation=man:systemd-udevd.service(8) man:udev(7)
+DefaultDependencies=no
+Before=sockets.target
+ConditionCapability=CAP_MKNOD
+
+[Socket]
+Service=systemd-udevd.service
+ListenSequentialPacket=/run/udev/control
+SocketMode=0600
+PassCredentials=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-udevd-kernel.socket b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-udevd-kernel.socket
new file mode 100644
index 00000000..4b8a5b0f
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sockets.target.wants/systemd-udevd-kernel.socket
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=udev Kernel Socket
+Documentation=man:systemd-udevd.service(8) man:udev(7)
+DefaultDependencies=no
+Before=sockets.target
+ConditionCapability=CAP_MKNOD
+
+[Socket]
+Service=systemd-udevd.service
+ReceiveBuffer=134217728
+ListenNetlink=kobject-uevent 1
+PassCredentials=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sound.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sound.target
new file mode 100644
index 00000000..6699adec
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sound.target
@@ -0,0 +1,11 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Sound Card
+Documentation=man:systemd.special(7)
+StopWhenUnneeded=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/suspend.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/suspend.target
new file mode 100644
index 00000000..f50cb226
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/suspend.target
@@ -0,0 +1,13 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Suspend
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+BindsTo=systemd-suspend.service
+After=systemd-suspend.service
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/swap.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/swap.target
new file mode 100644
index 00000000..23a7d0dc
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/swap.target
@@ -0,0 +1,10 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Swap
+Documentation=man:systemd.special(7)
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sys-fs-fuse-connections.mount b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sys-fs-fuse-connections.mount
new file mode 100644
index 00000000..ebd93e2c
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sys-fs-fuse-connections.mount
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=FUSE Control File System
+Documentation=https://www.kernel.org/doc/Documentation/filesystems/fuse.txt
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+DefaultDependencies=no
+ConditionPathExists=/sys/fs/fuse/connections
+After=systemd-modules-load.service
+Before=sysinit.target
+
+[Mount]
+What=fusectl
+Where=/sys/fs/fuse/connections
+Type=fusectl
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sys-kernel-config.mount b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sys-kernel-config.mount
new file mode 100644
index 00000000..020101c0
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sys-kernel-config.mount
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Configuration File System
+Documentation=https://www.kernel.org/doc/Documentation/filesystems/configfs/configfs.txt
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+DefaultDependencies=no
+ConditionPathExists=/sys/kernel/config
+After=systemd-modules-load.service
+Before=sysinit.target
+
+[Mount]
+What=configfs
+Where=/sys/kernel/config
+Type=configfs
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target
new file mode 100644
index 00000000..ec6fbefc
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target
@@ -0,0 +1,14 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=System Initialization
+Documentation=man:systemd.special(7)
+Conflicts=emergency.service emergency.target
+Wants= swap.target
+After= swap.target emergency.service emergency.target
+RefuseManualStart=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/dev-hugepages.mount b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/dev-hugepages.mount
new file mode 100644
index 00000000..d711faed
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/dev-hugepages.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Huge Pages File System
+Documentation=https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+DefaultDependencies=no
+Before=sysinit.target
+ConditionPathExists=/sys/kernel/mm/hugepages
+
+[Mount]
+What=hugetlbfs
+Where=/dev/hugepages
+Type=hugetlbfs
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/dev-mqueue.mount b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/dev-mqueue.mount
new file mode 100644
index 00000000..5c11ca7d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/dev-mqueue.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=POSIX Message Queue File System
+Documentation=man:mq_overview(7)
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+DefaultDependencies=no
+Before=sysinit.target
+ConditionPathExists=/proc/sys/fs/mqueue
+
+[Mount]
+What=mqueue
+Where=/dev/mqueue
+Type=mqueue
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount
new file mode 100644
index 00000000..6be38937
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Arbitrary Executable File Formats File System Automount Point
+Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+DefaultDependencies=no
+Before=sysinit.target
+ConditionPathExists=/proc/sys/fs/binfmt_misc/
+ConditionPathIsReadWrite=/proc/sys/
+
+[Automount]
+Where=/proc/sys/fs/binfmt_misc
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/sys-fs-fuse-connections.mount b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/sys-fs-fuse-connections.mount
new file mode 100644
index 00000000..ebd93e2c
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/sys-fs-fuse-connections.mount
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=FUSE Control File System
+Documentation=https://www.kernel.org/doc/Documentation/filesystems/fuse.txt
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+DefaultDependencies=no
+ConditionPathExists=/sys/fs/fuse/connections
+After=systemd-modules-load.service
+Before=sysinit.target
+
+[Mount]
+What=fusectl
+Where=/sys/fs/fuse/connections
+Type=fusectl
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/sys-kernel-config.mount b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/sys-kernel-config.mount
new file mode 100644
index 00000000..020101c0
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/sys-kernel-config.mount
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Configuration File System
+Documentation=https://www.kernel.org/doc/Documentation/filesystems/configfs/configfs.txt
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+DefaultDependencies=no
+ConditionPathExists=/sys/kernel/config
+After=systemd-modules-load.service
+Before=sysinit.target
+
+[Mount]
+What=configfs
+Where=/sys/kernel/config
+Type=configfs
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-binfmt.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-binfmt.service
new file mode 100644
index 00000000..897cf4e5
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-binfmt.service
@@ -0,0 +1,26 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Set Up Additional Binary Formats
+Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
+Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
+DefaultDependencies=no
+Conflicts=shutdown.target
+After= proc-sys-fs-binfmt_misc.automount
+Before=sysinit.target shutdown.target
+ConditionPathIsReadWrite=/proc/sys/
+ConditionDirectoryNotEmpty=|/lib/binfmt.d
+ConditionDirectoryNotEmpty=|/usr/lib/binfmt.d
+ConditionDirectoryNotEmpty=|/usr/local/lib/binfmt.d
+ConditionDirectoryNotEmpty=|/etc/binfmt.d
+ConditionDirectoryNotEmpty=|/run/binfmt.d
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/systemd-binfmt
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-journald.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-journald.service
new file mode 100644
index 00000000..77b4bfe9
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-journald.service
@@ -0,0 +1,26 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Journal Service
+Documentation=man:systemd-journald.service(8) man:journald.conf(5)
+DefaultDependencies=no
+Requires=systemd-journald.socket
+After=systemd-journald.socket syslog.socket
+Before=sysinit.target
+
+[Service]
+ExecStart=/usr/lib/systemd/systemd-journald
+Restart=always
+RestartSec=0
+NotifyAccess=all
+StandardOutput=null
+CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID
+
+# Increase the default a bit in order to allow many simultaneous
+# services being run since we keep one fd open per service.
+LimitNOFILE=16384
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-modules-load.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-modules-load.service
new file mode 100644
index 00000000..3ff810f7
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-modules-load.service
@@ -0,0 +1,27 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Load Kernel Modules
+Documentation=man:systemd-modules-load.service(8) man:modules-load.d(5)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=
+Before=sysinit.target shutdown.target
+ConditionCapability=CAP_SYS_MODULE
+ConditionDirectoryNotEmpty=|/lib/modules-load.d
+ConditionDirectoryNotEmpty=|/usr/lib/modules-load.d
+ConditionDirectoryNotEmpty=|/usr/local/lib/modules-load.d
+ConditionDirectoryNotEmpty=|/etc/modules-load.d
+ConditionDirectoryNotEmpty=|/run/modules-load.d
+ConditionKernelCommandLine=|modules-load
+ConditionKernelCommandLine=|rd.modules-load
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/systemd-modules-load
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-sysctl.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-sysctl.service
new file mode 100644
index 00000000..46e2475e
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-sysctl.service
@@ -0,0 +1,26 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Apply Kernel Variables
+Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=
+Before=sysinit.target shutdown.target
+ConditionPathIsReadWrite=/proc/sys/
+ConditionPathExists=|/etc/sysctl.conf
+ConditionDirectoryNotEmpty=|/lib/sysctl.d
+ConditionDirectoryNotEmpty=|/usr/lib/sysctl.d
+ConditionDirectoryNotEmpty=|/usr/local/lib/sysctl.d
+ConditionDirectoryNotEmpty=|/etc/sysctl.d
+ConditionDirectoryNotEmpty=|/run/sysctl.d
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/systemd-sysctl
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service
new file mode 100644
index 00000000..da1ee1f8
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Create static device nodes in /dev
+Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
+DefaultDependencies=no
+Before=sysinit.target systemd-udevd.service
+ConditionCapability=CAP_MKNOD
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/systemd-tmpfiles --prefix=/dev --create
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup.service
new file mode 100644
index 00000000..9e1a5650
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup.service
@@ -0,0 +1,23 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Recreate Volatile Files and Directories
+Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
+DefaultDependencies=no
+Wants=
+After=
+Before=sysinit.target shutdown.target
+ConditionDirectoryNotEmpty=|/usr/lib/tmpfiles.d
+ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d
+ConditionDirectoryNotEmpty=|/etc/tmpfiles.d
+ConditionDirectoryNotEmpty=|/run/tmpfiles.d
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-udev-trigger.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-udev-trigger.service
new file mode 100644
index 00000000..6b19c75d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-udev-trigger.service
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=udev Coldplug all Devices
+Documentation=man:udev(7) man:systemd-udevd.service(8)
+DefaultDependencies=no
+Wants=systemd-udevd.service systemd-udev-settle.service
+After=systemd-udevd-kernel.socket systemd-udevd-control.socket
+Before=sysinit.target systemd-udev-settle.service
+ConditionCapability=CAP_MKNOD
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/udevadm trigger --type=subsystems --action=add ; /usr/bin/udevadm trigger --type=devices --action=add
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-udevd.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-udevd.service
new file mode 100644
index 00000000..2c33ce53
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-udevd.service
@@ -0,0 +1,23 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=udev Kernel Device Manager
+Documentation=man:systemd-udevd.service(8) man:udev(7)
+DefaultDependencies=no
+Wants=systemd-udevd-control.socket systemd-udevd-kernel.socket
+After=systemd-udevd-control.socket systemd-udevd-kernel.socket
+Before=sysinit.target
+ConditionCapability=CAP_MKNOD
+
+[Service]
+Type=notify
+OOMScoreAdjust=-1000
+Sockets=systemd-udevd-control.socket systemd-udevd-kernel.socket
+Restart=always
+RestartSec=0
+ExecStart=/usr/lib/systemd/systemd-udevd
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-vconsole-setup.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-vconsole-setup.service
new file mode 100644
index 00000000..ce60c1bb
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/sysinit.target.wants/systemd-vconsole-setup.service
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Setup Virtual Console
+Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=
+Before=sysinit.target shutdown.target
+ConditionPathExists=/dev/tty0
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/systemd-vconsole-setup
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/syslog.socket b/remote/modules/systemd-distro/data/usr/lib/systemd/system/syslog.socket
new file mode 100644
index 00000000..e6e9cf85
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/syslog.socket
@@ -0,0 +1,40 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Syslog Socket
+Documentation=man:systemd.special(7)
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/syslog
+DefaultDependencies=no
+Before=sockets.target shutdown.target
+
+# Don't allow logging until the very end
+Conflicts=shutdown.target
+
+[Socket]
+ListenDatagram=/run/systemd/journal/syslog
+SocketMode=0666
+PassCredentials=yes
+PassSecurity=yes
+ReceiveBuffer=8M
+
+# The default syslog implementation should make syslog.service a
+# symlink to itself, so that this socket activates the right actual
+# syslog service.
+#
+# Examples:
+#
+# /etc/systemd/system/syslog.service -> /lib/systemd/system/rsyslog.service
+# /etc/systemd/system/syslog.service -> /lib/systemd/system/syslog-ng.service
+#
+# Best way to achieve that is by adding this to your unit file
+# (i.e. to rsyslog.service or syslog-ng.service):
+#
+# [Install]
+# Alias=syslog.service
+#
+# See http://www.freedesktop.org/wiki/Software/systemd/syslog for details.
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/system-update.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/system-update.target
new file mode 100644
index 00000000..b6008c8f
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/system-update.target
@@ -0,0 +1,16 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=System Update
+Documentation=http://freedesktop.org/wiki/Software/systemd/SystemUpdates
+Documentation=man:systemd.special(7) man:systemd-system-update-generator(8)
+Requires=sysinit.target
+Conflicts=shutdown.target
+After=sysinit.target
+Before=shutdown.target
+AllowIsolate=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-binfmt.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-binfmt.service
new file mode 100644
index 00000000..897cf4e5
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-binfmt.service
@@ -0,0 +1,26 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Set Up Additional Binary Formats
+Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
+Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
+DefaultDependencies=no
+Conflicts=shutdown.target
+After= proc-sys-fs-binfmt_misc.automount
+Before=sysinit.target shutdown.target
+ConditionPathIsReadWrite=/proc/sys/
+ConditionDirectoryNotEmpty=|/lib/binfmt.d
+ConditionDirectoryNotEmpty=|/usr/lib/binfmt.d
+ConditionDirectoryNotEmpty=|/usr/local/lib/binfmt.d
+ConditionDirectoryNotEmpty=|/etc/binfmt.d
+ConditionDirectoryNotEmpty=|/run/binfmt.d
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/systemd-binfmt
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-halt.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-halt.service
new file mode 100644
index 00000000..a13d67c6
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-halt.service
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Halt
+Documentation=man:systemd-halt.service(8)
+DefaultDependencies=no
+Requires=shutdown.target final.target
+After=shutdown.target final.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/systemctl --force halt
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-hibernate.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-hibernate.service
new file mode 100644
index 00000000..7f19e48f
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-hibernate.service
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Hibernate
+Documentation=man:systemd-suspend.service(8)
+DefaultDependencies=no
+Requires=sleep.target
+After=sleep.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/lib/systemd/systemd-sleep hibernate
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-hybrid-sleep.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-hybrid-sleep.service
new file mode 100644
index 00000000..7d627bfa
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-hybrid-sleep.service
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Hybrid Suspend+Hibernate
+Documentation=man:systemd-suspend.service(8)
+DefaultDependencies=no
+Requires=sleep.target
+After=sleep.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/lib/systemd/systemd-sleep hybrid-sleep
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-journald.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-journald.service
new file mode 100644
index 00000000..77b4bfe9
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-journald.service
@@ -0,0 +1,26 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Journal Service
+Documentation=man:systemd-journald.service(8) man:journald.conf(5)
+DefaultDependencies=no
+Requires=systemd-journald.socket
+After=systemd-journald.socket syslog.socket
+Before=sysinit.target
+
+[Service]
+ExecStart=/usr/lib/systemd/systemd-journald
+Restart=always
+RestartSec=0
+NotifyAccess=all
+StandardOutput=null
+CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID
+
+# Increase the default a bit in order to allow many simultaneous
+# services being run since we keep one fd open per service.
+LimitNOFILE=16384
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-journald.socket b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-journald.socket
new file mode 100644
index 00000000..4f0619d2
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-journald.socket
@@ -0,0 +1,26 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Journal Socket
+Documentation=man:systemd-journald.service(8) man:journald.conf(5)
+DefaultDependencies=no
+Before=sockets.target
+
+# Mount and swap units need this. If this socket unit is removed by an
+# isolate request the mount and and swap units would be removed too,
+# hence let's exclude this from isolate requests.
+IgnoreOnIsolate=yes
+
+[Socket]
+ListenStream=/run/systemd/journal/stdout
+ListenDatagram=/run/systemd/journal/socket
+ListenDatagram=/dev/log
+SocketMode=0666
+PassCredentials=yes
+PassSecurity=yes
+ReceiveBuffer=8M
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-logind.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-logind.service
new file mode 100644
index 00000000..71971e44
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-logind.service
@@ -0,0 +1,23 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Login Service
+Documentation=man:systemd-logind.service(8) man:logind.conf(5)
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/multiseat
+After=
+
+[Service]
+ExecStart=/usr/lib/systemd/systemd-logind
+Restart=always
+RestartSec=0
+BusName=org.freedesktop.login1
+CapabilityBoundingSet=CAP_AUDIT_CONTROL CAP_CHOWN CAP_KILL CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER CAP_SYS_TTY_CONFIG
+
+# Increase the default a bit in order to allow many simultaneous
+# logins since we keep one fd open per session.
+LimitNOFILE=16384
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-modules-load.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-modules-load.service
new file mode 100644
index 00000000..3ff810f7
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-modules-load.service
@@ -0,0 +1,27 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Load Kernel Modules
+Documentation=man:systemd-modules-load.service(8) man:modules-load.d(5)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=
+Before=sysinit.target shutdown.target
+ConditionCapability=CAP_SYS_MODULE
+ConditionDirectoryNotEmpty=|/lib/modules-load.d
+ConditionDirectoryNotEmpty=|/usr/lib/modules-load.d
+ConditionDirectoryNotEmpty=|/usr/local/lib/modules-load.d
+ConditionDirectoryNotEmpty=|/etc/modules-load.d
+ConditionDirectoryNotEmpty=|/run/modules-load.d
+ConditionKernelCommandLine=|modules-load
+ConditionKernelCommandLine=|rd.modules-load
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/systemd-modules-load
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-nspawn@.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-nspawn@.service
new file mode 100644
index 00000000..f9f9aa65
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-nspawn@.service
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Container %i
+Documentation=man:systemd-nspawn(1)
+
+[Service]
+ExecStart=/usr/bin/systemd-nspawn -bjD /var/lib/container/%i
+ControlGroup=%R/machine/%i.nspawn cpu:/
+Type=notify
+
+[Install]
+Also=multi-user.target
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-poweroff.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-poweroff.service
new file mode 100644
index 00000000..eede0eab
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-poweroff.service
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Power-Off
+Documentation=man:systemd-halt.service(8)
+DefaultDependencies=no
+Requires=shutdown.target final.target
+After=shutdown.target final.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/systemctl --force poweroff
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-reboot.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-reboot.service
new file mode 100644
index 00000000..b2d27c8e
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-reboot.service
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Reboot
+Documentation=man:systemd-halt.service(8)
+DefaultDependencies=no
+Requires=shutdown.target final.target
+After=shutdown.target final.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/systemctl --force reboot
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-shutdownd.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-shutdownd.service
new file mode 100644
index 00000000..38c663de
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-shutdownd.service
@@ -0,0 +1,15 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Delayed Shutdown Service
+Documentation=man:systemd-shutdownd.service(8)
+DefaultDependencies=no
+
+[Service]
+ExecStart=/usr/lib/systemd/systemd-shutdownd
+NotifyAccess=all
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-shutdownd.socket b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-shutdownd.socket
new file mode 100644
index 00000000..9421ce8a
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-shutdownd.socket
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Delayed Shutdown Socket
+Documentation=man:systemd-shutdownd.service(8)
+DefaultDependencies=no
+Before=sockets.target
+
+[Socket]
+ListenDatagram=/run/systemd/shutdownd
+SocketMode=0600
+PassCredentials=yes
+PassSecurity=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-suspend.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-suspend.service
new file mode 100644
index 00000000..5d242edd
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-suspend.service
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Suspend
+Documentation=man:systemd-suspend.service(8)
+DefaultDependencies=no
+Requires=sleep.target
+After=sleep.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/lib/systemd/systemd-sleep suspend
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-sysctl.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-sysctl.service
new file mode 100644
index 00000000..46e2475e
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-sysctl.service
@@ -0,0 +1,26 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Apply Kernel Variables
+Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=
+Before=sysinit.target shutdown.target
+ConditionPathIsReadWrite=/proc/sys/
+ConditionPathExists=|/etc/sysctl.conf
+ConditionDirectoryNotEmpty=|/lib/sysctl.d
+ConditionDirectoryNotEmpty=|/usr/lib/sysctl.d
+ConditionDirectoryNotEmpty=|/usr/local/lib/sysctl.d
+ConditionDirectoryNotEmpty=|/etc/sysctl.d
+ConditionDirectoryNotEmpty=|/run/sysctl.d
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/systemd-sysctl
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-tmpfiles-setup-dev.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-tmpfiles-setup-dev.service
new file mode 100644
index 00000000..da1ee1f8
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-tmpfiles-setup-dev.service
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Create static device nodes in /dev
+Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
+DefaultDependencies=no
+Before=sysinit.target systemd-udevd.service
+ConditionCapability=CAP_MKNOD
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/systemd-tmpfiles --prefix=/dev --create
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-tmpfiles-setup.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-tmpfiles-setup.service
new file mode 100644
index 00000000..9e1a5650
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-tmpfiles-setup.service
@@ -0,0 +1,23 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Recreate Volatile Files and Directories
+Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
+DefaultDependencies=no
+Wants=
+After=
+Before=sysinit.target shutdown.target
+ConditionDirectoryNotEmpty=|/usr/lib/tmpfiles.d
+ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d
+ConditionDirectoryNotEmpty=|/etc/tmpfiles.d
+ConditionDirectoryNotEmpty=|/run/tmpfiles.d
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udev-settle.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udev-settle.service
new file mode 100644
index 00000000..146c6499
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udev-settle.service
@@ -0,0 +1,31 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# This service can dynamically be pulled-in by legacy services which
+# cannot reliably cope with dynamic device configurations, and wrongfully
+# expect a populated /dev during bootup.
+
+[Unit]
+Description=udev Wait for Complete Device Initialization
+Documentation=man:udev(7) man:systemd-udevd.service(8)
+DefaultDependencies=no
+Wants=systemd-udevd.service
+After=systemd-udev-trigger.service
+Before=sysinit.target
+ConditionCapability=CAP_MKNOD
+
+[Service]
+Type=oneshot
+TimeoutSec=180
+RemainAfterExit=yes
+# Don't ask...
+ExecStart=/opt/openslx/bin/usleep 100000
+ExecStart=/usr/bin/udevadm settle --timeout=3
+ExecStart=/opt/openslx/bin/usleep 20000
+ExecStart=/usr/bin/udevadm settle --timeout=3
+ExecStart=/opt/openslx/bin/usleep 20000
+ExecStart=/usr/bin/udevadm settle --timeout=3
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udev-trigger.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udev-trigger.service
new file mode 100644
index 00000000..6b19c75d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udev-trigger.service
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=udev Coldplug all Devices
+Documentation=man:udev(7) man:systemd-udevd.service(8)
+DefaultDependencies=no
+Wants=systemd-udevd.service systemd-udev-settle.service
+After=systemd-udevd-kernel.socket systemd-udevd-control.socket
+Before=sysinit.target systemd-udev-settle.service
+ConditionCapability=CAP_MKNOD
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/udevadm trigger --type=subsystems --action=add ; /usr/bin/udevadm trigger --type=devices --action=add
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd-control.socket b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd-control.socket
new file mode 100644
index 00000000..ca17102d
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd-control.socket
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=udev Control Socket
+Documentation=man:systemd-udevd.service(8) man:udev(7)
+DefaultDependencies=no
+Before=sockets.target
+ConditionCapability=CAP_MKNOD
+
+[Socket]
+Service=systemd-udevd.service
+ListenSequentialPacket=/run/udev/control
+SocketMode=0600
+PassCredentials=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd-kernel.socket b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd-kernel.socket
new file mode 100644
index 00000000..4b8a5b0f
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd-kernel.socket
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=udev Kernel Socket
+Documentation=man:systemd-udevd.service(8) man:udev(7)
+DefaultDependencies=no
+Before=sockets.target
+ConditionCapability=CAP_MKNOD
+
+[Socket]
+Service=systemd-udevd.service
+ReceiveBuffer=134217728
+ListenNetlink=kobject-uevent 1
+PassCredentials=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd.service
new file mode 100644
index 00000000..2c33ce53
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-udevd.service
@@ -0,0 +1,23 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=udev Kernel Device Manager
+Documentation=man:systemd-udevd.service(8) man:udev(7)
+DefaultDependencies=no
+Wants=systemd-udevd-control.socket systemd-udevd-kernel.socket
+After=systemd-udevd-control.socket systemd-udevd-kernel.socket
+Before=sysinit.target
+ConditionCapability=CAP_MKNOD
+
+[Service]
+Type=notify
+OOMScoreAdjust=-1000
+Sockets=systemd-udevd-control.socket systemd-udevd-kernel.socket
+Restart=always
+RestartSec=0
+ExecStart=/usr/lib/systemd/systemd-udevd
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-user-sessions.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-user-sessions.service
new file mode 100644
index 00000000..9226e3ea
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-user-sessions.service
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Permit User Sessions
+Documentation=man:systemd-user-sessions.service(8)
+After=
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/systemd-user-sessions start
+ExecStop=/usr/lib/systemd/systemd-user-sessions stop
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-vconsole-setup.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-vconsole-setup.service
new file mode 100644
index 00000000..ce60c1bb
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/systemd-vconsole-setup.service
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Setup Virtual Console
+Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=
+Before=sysinit.target shutdown.target
+ConditionPathExists=/dev/tty0
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/systemd-vconsole-setup
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/time-sync.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/time-sync.target
new file mode 100644
index 00000000..54078069
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/time-sync.target
@@ -0,0 +1,14 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# This exists mostly for compatibility with SysV/LSB units, and
+# implementations lacking socket/bus activation.
+
+[Unit]
+Description=System Time Synchronized
+Documentation=man:systemd.special(7)
+RefuseManualStart=yes
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/timers.target b/remote/modules/systemd-distro/data/usr/lib/systemd/system/timers.target
new file mode 100644
index 00000000..07fda3d9
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/timers.target
@@ -0,0 +1,10 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Timers
+Documentation=man:systemd.special(7)
diff --git a/remote/modules/systemd-distro/data/usr/lib/systemd/system/user@.service b/remote/modules/systemd-distro/data/usr/lib/systemd/system/user@.service
new file mode 100644
index 00000000..876c28c9
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/systemd/system/user@.service
@@ -0,0 +1,23 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=User Manager for %u
+After=systemd-user-sessions.service
+
+[Service]
+User=%I
+PAMName=systemd-shared
+# in order to allow MEM_CG features to work, add "memory:/" here
+ControlGroup=%R/user/%U.user/shared cpu:/
+ControlGroupModify=yes
+Type=notify
+ExecStart=-/usr/lib/systemd/systemd --user
+Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%U/dbus/user_bus_socket
+
+[Install]
+Alias=user@%i.service
diff --git a/remote/modules/systemd-distro/data/usr/lib/udev/rules.d/70-uaccess-floppy.rules b/remote/modules/systemd-distro/data/usr/lib/udev/rules.d/70-uaccess-floppy.rules
new file mode 100644
index 00000000..113d288a
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/udev/rules.d/70-uaccess-floppy.rules
@@ -0,0 +1,8 @@
+ACTION=="remove", GOTO="floppy_extra_end"
+ENV{MAJOR}=="", GOTO="floppy_extra_end"
+
+# floppy devices
+SUBSYSTEM=="block", KERNEL=="fd[0-9]*", TAG+="uaccess"
+
+LABEL="floppy_extra_end"
+
diff --git a/remote/modules/systemd-distro/data/usr/lib/udev/rules.d/99-systemd.rules b/remote/modules/systemd-distro/data/usr/lib/udev/rules.d/99-systemd.rules
new file mode 100644
index 00000000..99cdf676
--- /dev/null
+++ b/remote/modules/systemd-distro/data/usr/lib/udev/rules.d/99-systemd.rules
@@ -0,0 +1,56 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+ACTION=="remove", GOTO="systemd_end"
+
+SUBSYSTEM=="tty", KERNEL=="tty[0-9]|tty1[0-2]", TAG+="systemd"
+SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*", TAG+="systemd"
+
+KERNEL=="vport*", TAG+="systemd"
+
+SUBSYSTEM=="block", KERNEL!="ram*|loop*", TAG+="systemd"
+SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"
+
+# Ignore encrypted devices with no identified superblock on it, since
+# we are probably still calling mke2fs or mkswap on it.
+
+SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0"
+
+# We need a hardware independent way to identify network devices. We
+# use the /sys/subsystem path for this. Current vanilla kernels don't
+# actually support that hierarchy right now, however upcoming kernels
+# will. HAL and udev internally support /sys/subsystem already, hence
+# it should be safe to use this here, too. This is mostly just an
+# identification string for systemd, so whether the path actually is
+# accessible or not does not matter as long as it is unique and in the
+# filesystem namespace.
+#
+# http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=libudev/libudev-enumerate.c;h=da831449dcaf5e936a14409e8e68ab12d30a98e2;hb=HEAD#l742
+
+SUBSYSTEM=="net", KERNEL=="eth*", TAG=="openslxignore", GOTO="systemd_end"
+
+SUBSYSTEM=="net", KERNEL=="br0|eth*", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/net/devices/$name", ENV{SYSTEMD_WANTS}="network-interface@$name.service"
+SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/bluetooth/devices/%k"
+
+SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}="bluetooth.target"
+ENV{ID_SMARTCARD_READER}=="*?", TAG+="systemd", ENV{SYSTEMD_WANTS}="smartcard.target"
+SUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}="sound.target"
+
+SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}="printer.target"
+SUBSYSTEM=="usb", KERNEL=="lp*", TAG+="systemd", ENV{SYSTEMD_WANTS}="printer.target"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}="printer.target"
+
+# Apply sysctl variables to network devices (and only to those) as they appear.
+SUBSYSTEM=="net", KERNEL=="eth*", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name"
+
+# Asynchronously mount file systems implemented by these modules as
+# soon as they are loaded.
+
+SUBSYSTEM=="module", KERNEL=="fuse", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="sys-fs-fuse-connections.mount"
+SUBSYSTEM=="module", KERNEL=="configfs", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="sys-kernel-config.mount"
+
+LABEL="systemd_end"
diff --git a/remote/modules/systemd-distro/module.build b/remote/modules/systemd-distro/module.build
new file mode 100644
index 00000000..fa29a75f
--- /dev/null
+++ b/remote/modules/systemd-distro/module.build
@@ -0,0 +1,15 @@
+fetch_source () {
+ :
+}
+
+build () {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "$MODULE_BUILD_DIR"
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/systemd-distro/module.conf b/remote/modules/systemd-distro/module.conf
new file mode 100644
index 00000000..f45351b7
--- /dev/null
+++ b/remote/modules/systemd-distro/module.conf
@@ -0,0 +1,8 @@
+REQUIRED_DIRECTORIES="
+ /etc
+ /usr
+"
+REQUIRED_SYSTEM_FILES="
+ /usr/lib/tmpfiles.d
+ /etc/tmpfiles.d
+"
diff --git a/remote/modules/systemd-distro/module.conf.centos b/remote/modules/systemd-distro/module.conf.centos
new file mode 100644
index 00000000..856f60fa
--- /dev/null
+++ b/remote/modules/systemd-distro/module.conf.centos
@@ -0,0 +1,7 @@
+REQUIRED_CONTENT_PACKAGES="
+ systemd
+ systemd-libs
+"
+REQUIRED_SYSTEM_FILES+="
+ /usr/lib/systemd/system
+"
diff --git a/remote/modules/systemd-distro/module.conf.debian b/remote/modules/systemd-distro/module.conf.debian
new file mode 100644
index 00000000..2768b51c
--- /dev/null
+++ b/remote/modules/systemd-distro/module.conf.debian
@@ -0,0 +1,13 @@
+REQUIRED_INSTALLED_PACKAGES="
+ intltool
+ gperf
+ dbus
+ pkg-config
+ libcap-dev
+ libudev-dev
+ libdbus-1-dev
+ xsltproc
+ libblkid-dev
+ libacl1-dev
+ libpam-dev
+"
diff --git a/remote/modules/systemd-distro/module.conf.fedora b/remote/modules/systemd-distro/module.conf.fedora
new file mode 100644
index 00000000..9232ea5f
--- /dev/null
+++ b/remote/modules/systemd-distro/module.conf.fedora
@@ -0,0 +1,11 @@
+REQUIRED_INSTALLED_PACKAGES="
+ intltool
+ gperf
+ libcap-devel
+ libudev-devel
+ dbus-devel
+ libxslt
+ libblkid-devel
+ libacl-devel
+ glib2-devel
+"
diff --git a/remote/modules/systemd-distro/module.conf.opensuse b/remote/modules/systemd-distro/module.conf.opensuse
new file mode 100644
index 00000000..965333c4
--- /dev/null
+++ b/remote/modules/systemd-distro/module.conf.opensuse
@@ -0,0 +1,10 @@
+REQUIRED_INSTALLED_PACKAGES="
+ intltool
+ gperf
+ libcap-devel
+ libudev-devel
+ dbus-1-devel
+ libxslt-tools
+ libblkid-devel
+ libacl-devel
+"
diff --git a/remote/modules/systemd-distro/module.conf.scientific b/remote/modules/systemd-distro/module.conf.scientific
new file mode 100644
index 00000000..54e62b96
--- /dev/null
+++ b/remote/modules/systemd-distro/module.conf.scientific
@@ -0,0 +1,37 @@
+REQUIRED_VERSION="systemd-204"
+REQUIRED_URL="http://www.freedesktop.org/software/systemd/${REQUIRED_VERSION}.tar.xz"
+
+REQUIRED_LIBKMOD_VERSION="kmod-12"
+REQUIRED_LIBKMOD_URL="http://www.kernel.org/pub/linux/utils/kernel/kmod/${REQUIRED_LIBKMOD_VERSION}.tar.gz"
+
+REQUIRED_UTILLINUX_VERSION="util-linux-2.23"
+REQUIRED_UTILLINUX_URL="ftp://ftp.kernel.org/pub/linux/utils/util-linux/v${REQUIRED_UTILLINUX_VERSION}/util-linux-${REQUIRED_UTILLINUX_VERSION}.tar.xz"
+
+REQUIRED_M4_VERSION="m4-1.4.16"
+REQUIRED_M4_URL="ftp://ftp.gnu.org/gnu/m4/${REQUIRED_M4_VERSION}.tar.xz"
+
+REQUIRED_AUTOCONF_VERSION="autoconf-2.69"
+REQUIRED_AUTOCONF_URL="ftp://ftp.gnu.org/gnu/autoconf/${REQUIRED_AUTOCONF_VERSION}.tar.xz"
+
+REQUIRED_AUTOMAKE_VERSION="automake-1.13"
+REQUIRED_AUTOMAKE_URL="ftp://ftp.gnu.org/gnu/automake/${REQUIRED_AUTOMAKE_VERSION}.tar.xz"
+
+REQUIRED_DBUS_VERSION="dbus-1.6.8"
+REQUIRED_DBUS_URL="http://dbus.freedesktop.org/releases/dbus/${REQUIRED_DBUS_VERSION}.tar.gz"
+
+
+
+REQUIRED_INSTALLED_PACKAGES="
+ intltool
+ gperf
+ pkgconfig
+ libcap-devel
+ libudev-devel
+ dbus-devel
+ libxslt
+ libblkid-devel
+ libacl-devel
+ pam-devel
+ glib2-devel
+ expat-devel
+"
diff --git a/remote/modules/systemd-distro/module.conf.ubuntu b/remote/modules/systemd-distro/module.conf.ubuntu
new file mode 100644
index 00000000..e5dff817
--- /dev/null
+++ b/remote/modules/systemd-distro/module.conf.ubuntu
@@ -0,0 +1,12 @@
+REQUIRED_INSTALLED_PACKAGES="
+ intltool
+ gperf
+ dbus
+ libcap-dev
+ libudev-dev
+ libdbus-1-dev
+ xsltproc
+ libblkid-dev
+ libacl1-dev
+ libpam-dev
+"
diff --git a/remote/modules/systemd-distro/module.conf.ubuntu.14 b/remote/modules/systemd-distro/module.conf.ubuntu.14
new file mode 100644
index 00000000..7b2f853c
--- /dev/null
+++ b/remote/modules/systemd-distro/module.conf.ubuntu.14
@@ -0,0 +1,71 @@
+REQUIRED_VERSION="systemd-204"
+REQUIRED_URL="http://www.freedesktop.org/software/systemd/${REQUIRED_VERSION}.tar.xz"
+REQUIRED_LIBKMOD_VERSION="kmod-14"
+REQUIRED_LIBKMOD_URL="http://www.kernel.org/pub/linux/utils/kernel/kmod/${REQUIRED_LIBKMOD_VERSION}.tar.xz"
+REQUIRED_INSTALLED_PACKAGES="
+ intltool
+ gperf
+ dbus
+ pkg-config
+ libcap-dev
+ libudev-dev
+ libdbus-1-dev
+ xsltproc
+ libblkid-dev
+ libacl1-dev
+ libpam-dev
+"
+REQUIRED_BINARIES="
+ journalctl
+ loginctl
+ systemctl
+ systemd-analyze
+ systemd-ask-password
+ systemd-cat
+ systemd-cgls
+ systemd-cgtop
+ systemd-delta
+ systemd-detect-virt
+ systemd-inhibit
+ systemd-machine-id-setup
+ systemd-notify
+ systemd-nspawn
+ systemd-stdio-bridge
+ systemd-tmpfiles
+ systemd-tty-ask-password-agent
+ udevadm
+ systemd
+ systemd-ac-power
+ systemd-binfmt
+ systemd-cgroups-agent
+ systemd-fsck
+ systemd-initctl
+ systemd-journald
+ systemd-logind
+ systemd-modules-load
+ systemd-multi-seat-x
+ systemd-random-seed
+ systemd-readahead
+ systemd-remount-fs
+ systemd-reply-password
+ systemd-shutdown
+ systemd-shutdownd
+ systemd-sleep
+ systemd-sysctl
+ systemd-udevd
+ systemd-update-utmp
+ systemd-user-sessions
+ systemd-vconsole-setup
+ systemd-fstab-generator
+ systemd-getty-generator
+ systemd-rc-local-generator
+ systemd-system-update-generator
+ accelerometer
+ ata_id
+ cdrom_id
+ collect
+ mtd_probe
+ scsi_id
+ v4l_id
+"
+REQUIRED_XATTR_PATCH="yes"
diff --git a/remote/modules/vbox/data/opt/openslx/scripts/vmchooser-xml_filter b/remote/modules/vbox/data/opt/openslx/scripts/vmchooser-xml_filter
deleted file mode 100755
index c50b01a5..00000000
--- a/remote/modules/vbox/data/opt/openslx/scripts/vmchooser-xml_filter
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/bash
-# Probably needs bash somewhere
-# -----------------------------------------------------------------------------
-# Copyright (c) 2007..2009 - RZ Uni FR
-# Copyright (c) 2007..2011 - OpenSLX GmbH
-#
-# This program is free software distributed under the GPL version 2.
-# See http://openslx.org/COPYING
-#
-# If you have any feedback please consult http://openslx.org/feedback and
-# send your suggestions, praise, or complaints to feedback@openslx.org
-#
-# General information about OpenSLX can be found at http://openslx.org/
-# -----------------------------------------------------------------------------
-# xmlfilter.sh
-# - This script is invoked by the vmchooser tool. It simply filters xml-
-# files (taking the path to these files in $1). You might modify it in any
-# way to match your needs, e.g. ask some database instead. You can re-
-# implement it in any other programming language too. You simply have to
-# return a list of proper xml files to be interpreted by the vmchooser
-# binary). Please check for vmchooser.sh too ...
-# -----------------------------------------------------------------------------
-
-# This script .
-#
-# currently:
-# - filter for slxgrp (which comes from /etc/machine-setup)
-#
-
-# include default directories
-. /opt/openslx/config
-
-if [ -f "${OPENSLX_DEFAULT_CONFDIR}/plugins/vmchooser/vmchooser.conf" ]; then
- . "${OPENSLX_DEFAULT_CONFDIR}/plugins/vmchooser/vmchooser.conf"
-fi
-
-function handlePersistentVM() {
- if grep --extended-regexp -q "<persistent param=\"(|.+:)$USER(|:.+)\"" "$1"; then
- # If this virtual machine is useable as persistent version for current
- # user we provide an additional persistent version.
- # TODO: This evil black magic needs to be rewritten some day (by someone who understands it)
- local originalImagePath=$(grep -io '<image_name param=.*"' "$1" | sed -e "s/&.*;/; /g" | awk -F '"' '{ print $2 }')
- local imageName=$(basename "$originalImagePath")
- eval export SLX_VM_PERSISTENT_PATH="${SLX_VM_PERSISTENT_PATH}" && \
- local imagePath="${SLX_VM_PERSISTENT_PATH}${imageName}"
- local persistentConfigVersionFilePath="$(mktemp --directory)/$(basename "$1")"
- local vmchooserFilePath="$(dirname "$0")/vmchooser-clc"
- if [ ! -f "$vmchooserFilePath" ]; then
- vmchooserFilePath='/opt/openslx/scripts/vmchooser-clc'
- fi
- "$vmchooserFilePath" "$1" "$persistentConfigVersionFilePath" \
- --create-persistent-config "$imagePath" && \
- echo "$persistentConfigVersionFilePath"
- fi
-}
-
-for FILE in $(find -L "$1" -iname "*.xml"); do
- # filter all xmls which aren't set active
- grep -i -q "<active param=.*true.*" "$FILE" || continue
- # HACK: filter all virtualbox images, as vbox is not ready yet
- #grep -i -q "<virtualmachine param=.*virtualbox.*" "$FILE" && continue
- if [ -n "${SLX_VM_POOL_FILTER}" ]; then
- # filter all xmls with pool-param not equal to vmchooser::env
- if [ $(grep "<pools param=\"${SLX_VM_POOL_FILTER}\"" "$FILE" | wc -l) -eq 1 ]; then
- handlePersistentVM "$FILE"
- echo "$FILE"
- fi
- else
- handlePersistentVM "$FILE"
- # if there is no pool set, just take all available xmls
- echo "$FILE"
- fi
-done
-
diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
index 759b8352..726c2340 100755
--- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
+++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
@@ -239,6 +239,7 @@ writelog "VM config:"
imgname=$(grep -io '<image_path param=.*"' "${xmlfile}" | sed -e "s/&.*;/; /g" | awk -F '"' '{ print $2 }')
imgrelpath=$(grep -io '<image_name param=.*"' "${xmlfile}" | sed -e "s/&.*;/; /g" | awk -F '"' '{ print $2 }')
[ -z "$imgname" ] && imgname="${imgrelpath}"
+imgrelpath=${imgrelpath#/mnt/vmstore/}
## Added for persistent support.
if [[ "$userBranchFilePath" ]]; then
diff --git a/remote/modules/vmchooser2/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser2/data/opt/openslx/scripts/vmchooser-run_virt
index 759b8352..726c2340 100755
--- a/remote/modules/vmchooser2/data/opt/openslx/scripts/vmchooser-run_virt
+++ b/remote/modules/vmchooser2/data/opt/openslx/scripts/vmchooser-run_virt
@@ -239,6 +239,7 @@ writelog "VM config:"
imgname=$(grep -io '<image_path param=.*"' "${xmlfile}" | sed -e "s/&.*;/; /g" | awk -F '"' '{ print $2 }')
imgrelpath=$(grep -io '<image_name param=.*"' "${xmlfile}" | sed -e "s/&.*;/; /g" | awk -F '"' '{ print $2 }')
[ -z "$imgname" ] && imgname="${imgrelpath}"
+imgrelpath=${imgrelpath#/mnt/vmstore/}
## Added for persistent support.
if [[ "$userBranchFilePath" ]]; then
diff --git a/remote/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart b/remote/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart
index 86511458..be3235c1 100755
--- a/remote/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart
+++ b/remote/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart
@@ -4,7 +4,7 @@ SOURCEPATH="/opt/openslx/vmchooser/sessionstart.d"
if [ -d "$SOURCEPATH" ]; then
for file in $SOURCEPATH/*; do
- . "$file" || slxlog "vmchooser-sessionstart" "Could not source $file at session start!" "$file"
+ "$file" || slxlog "vmchooser-sessionstart" "Could not source $file at session start!" "$file"
done
fi
diff --git a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig
index eb0e6d99..858102d2 100644
--- a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig
+++ b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig
@@ -37,7 +37,6 @@ fetch_config_files() {
update_sysconfig() {
# sanity checks
[ ! -e "${CONFIG}" ] && { echo "Cannot update. '$CONFIG' does not exist."; return 1; }
- [ ! -e "${CONFIG}.tgz" ] && { echo "Cannot update. '$CONFIG' does not exist."; return 1; }
# write IP and SLX_SERVER configuration to $CONFIG
cat >> "$CONFIG" <<HEREEND
@@ -49,6 +48,8 @@ SLX_PXE_DNS='$DNS_SERVER'
SLX_PXE_MAC='$BRIDGEMAC'
HEREEND
+ [ ! -e "${CONFIG}.tgz" ] && { echo "Cannot update. '$CONFIG' does not exist."; return 1; }
+
# setup hardware clock
. "${CONFIG}"
if [ "x$SLX_BIOS_CLOCK" == "xlocal" ]; then
diff --git a/remote/rootfs/rootfs-stage31/data/inc/udhcpc-trigger b/remote/rootfs/rootfs-stage31/data/inc/udhcpc-trigger
index dfed3168..02987f21 100755
--- a/remote/rootfs/rootfs-stage31/data/inc/udhcpc-trigger
+++ b/remote/rootfs/rootfs-stage31/data/inc/udhcpc-trigger
@@ -59,7 +59,7 @@ done
if [ -z "$domain" ]; then
# try to get domain via reverse lookup if empty
echo "..trying to get domain via DNS, as DHCP didn't supply one.."
- fqdn=$(nslookup "$ip" | grep -E "^Address +[0-9]+: +$ip " | head -n 1 | awk '{print $4}')
+ fqdn=$(timeout -t 3 nslookup "$ip" | grep -E "^Address +[0-9]+: +$ip " | head -n 1 | awk '{print $4}')
domain="${fqdn#*.}"
fi
if [ -n "$domain" ]; then
@@ -76,7 +76,7 @@ fi
if [ -z "$hostname" ]; then
# as with domain, if there's no hostname, try to get via DNS
echo "..trying to get hostname via DNS, as DHCP didn't supply one.."
- [ -z "$fqdn" ] && fqdn=$(nslookup "$ip" | grep -E "^Address +[0-9]+: +$ip " | head -n 1 | awk '{print $4}')
+ [ -z "$fqdn" ] && fqdn=$(timeout -t 3 nslookup "$ip" | grep -E "^Address +[0-9]+: +$ip " | head -n 1 | awk '{print $4}')
hostname="${fqdn%%.*}"
elif [ -n "$domain" ]; then
fqdn="${hostname}.${domain%% *}" # in case domain is a list
diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/setup-partitions.service b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/setup-partitions.service
index 6bb3a986..67466fae 100644
--- a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/setup-partitions.service
+++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/setup-partitions.service
@@ -4,6 +4,7 @@ DefaultDependencies=no
Before=basic.target
After=systemd-udev-settle.service
Wants=tmp.target
+ConditionKernelCommandLine=!partitioner
[Service]
Type=oneshot
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
index 54df5d41..8fc7535c 100755
--- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
@@ -14,10 +14,8 @@
#############################################################################
-# Mount point for persistent scratch partition (type 49 for BOOT, type48 for CACHE, type 47 for HOME)
-PERSISTENT_BOOT="/boot"
-PERSISTENT_CACHE="/cache"
-PERSISTENT_HOME="/home"
+# read global OpenSLX config
+. /opt/openslx/config || { echo "Could not source config!"; exit 23; }
# General formatter for the /tmp partition on a local harddisk
diskfm () {
@@ -59,7 +57,8 @@ diskfm () {
mopt="-o noexec"
;;
esac
- mkfs.$fs ${fopt} "${target}"
+ echo "formatting ${target} with $fs..."
+ mkfs.$fs ${fopt} "${target}" > /dev/null 2>&1
fi
[ -n "$found" ] && break
fi
@@ -75,7 +74,7 @@ mount_temp () {
mount $@ /tmp || return 1
chmod a+rwxt /tmp
# Move stuff from working directory, which is old /tmp, to new /tmp just mounted
- mv ./* ./.[!.]* ./..?* /tmp/ 2> /dev/null
+ mv ./* ./.[!.]* ./..?* /tmp/ > /dev/null 2>&1
local OLD=$(LANG=C ls -alh | grep -v -E ' \.\.?$' | grep -v '^total')
[ -n "$OLD" ] && echo -- "Leftovers:" && echo -- "$OLD"
cd "$PRE"
@@ -83,7 +82,7 @@ mount_temp () {
mount_temp_fallback () {
mkdir -p /tmptmp
- mv /tmp/* /tmp/.* /tmptmp/ 2> /dev/null
+ mv /tmp/* /tmp/.* /tmptmp/ > /dev/null 2>&1
mount $@ /tmp || return 1
chmod a+rwxt /tmp
mv /tmptmp/* /tmptmp/.* /tmp/
@@ -91,97 +90,142 @@ mount_temp_fallback () {
return 0
}
-fdisk -l | sed -n "/^\/dev\//p" > "/etc/disk.partition"
+mount_partition () {
+ local mountpoint="$1"
+ local partition="$2"
-echo "Partitions:"
-cat "/etc/disk.partition"
-
-# Check for standard swap partitions and make them available to the system
-HAVE_SWAP=no
-for hdpartnr in $(sed -n -e "/ 82 /p" "/etc/disk.partition" | sed -e "s/[[:space:]].*//"); do
- echo -e "$hdpartnr\tswap\t\tswap\t\tdefaults\t 0 0" >> "/etc/fstab"
- swapon "$hdpartnr" -p 10 && HAVE_SWAP=yes # low priority, in case we have zram swap, prefer that)
-done
-
-# We use special non assigned partition type (id44) for harddisk scratch
-# space, thus no normal filesystem will be incidentally deleted or
-# corrupted
-HAVE_TEMP=no
-for hdpartnr in $(sed -n -e "/ 44 /p" "/etc/disk.partition" | sed -e "s/[[:space:]].*//"); do
- # check for supported filesystem and formatter
- if diskfm "$hdpartnr"; then
- # echo "$hdpartnr is mounted to /mnt/tmp at $(sysup)" >/tmp/tmpready
- mount_temp "$mopt" "$hdpartnr" || continue
- echo -e "${hdpartnr}\t/tmp\t\tauto\t\tnoexec\t 0 0" >> "/etc/fstab"
- HAVE_TEMP=yes
- break
+ mkdir -p "$mountpoint"
+ if ! blkid -s TYPE | grep "${partition}" ; then
+ echo "No fs found for ${partition}, formating..."
+ diskfm "$partition" "jfs xfs ext3" || return $?
+ mount -t auto -o noexec "$partition" "$mountpoint" || return $?
else
- echo "formatting failed for some reason"
- fi # Made this non-forking, systemd should handle it - 2013-05-28
-done
+ if ! mount -t auto -o noexec "$partition" "$mountpoint" ; then
+ echo "Mount of $partition on $mountpoint failed with code $?, trying fsck..."
+ fsck "$partition" || return $?
+ mount -t auto -o noexec "$partition" "$mountpoint" || return $?
+ fi
+ fi
+ echo "${partition}\t${mountpoint}\tauto\t\tnoauto,noexec\t\t 0 0" >> "/etc/fstab"
+}
-# Put detected linux partitions (83) into /etc/fstab with "noauto", special
-# partition 45 (persistent scratch) to /var/scratch and 46 to /var/openslx
-HAVE_PERSISTENT_BOOT=no
-HAVE_PERSISTENT_CACHE=no
-HAVE_PERSISTENT_HOME=no
-for partid in 83 49 48 47 46; do
- for hdpartnr in $(sed -n -e "/ ${partid} /p" "/etc/disk.partition" | sed -e "s/[[:space:]].*//"); do
- if [ "${partid}" -eq 83 ]; then
- mkdir -p "/media/${hdpartnr#/dev/*}"
- echo -e "${hdpartnr}\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto,noexec\t 0 0" >> "/etc/fstab"
-
- elif [ "${partid}" -eq 49 -a "$HAVE_PERSISTENT_BOOT" = "no" ]; then
- mkdir -p "$PERSISTENT_BOOT"
- if ! mount -t auto -o noexec "${hdpartnr}" "$PERSISTENT_BOOT"; then
- diskfm "$hdpartnr" "jfs xfs ext3" || continue
- mount -t auto -o noexec "${hdpartnr}" "$PERSISTENT_BOOT" || continue
- fi
- HAVE_PERSISTENT_BOOT=yes
- echo -e "${hdpartnr}\t${PERSISTENT_BOOT}\tauto\t\tnoauto,noexec\t\t 0 0" >> "/etc/fstab"
-
- elif [ "${partid}" -eq 48 -a "$HAVE_PERSISTENT_CACHE" = "no" ]; then
- mkdir -p "$PERSISTENT_CACHE"
- if ! mount -t auto -o noexec "${hdpartnr}" "$PERSISTENT_CACHE"; then
- diskfm "$hdpartnr" "jfs xfs ext3" || continue
- mount -t auto -o noexec "${hdpartnr}" "$PERSISTENT_CACHE" || continue
- fi
- HAVE_PERSISTENT_CACHE=yes
- echo -e "${hdpartnr}\t${PERSISTENT_CACHE}\tauto\t\tnoauto,noexec\t\t 0 0" >> "/etc/fstab"
-
- elif [ "${partid}" -eq 47 -a "$HAVE_PERSISTENT_HOME" = "no" ]; then
- mkdir -p "$PERSISTENT_HOME"
- if ! mount -t auto -o noexec "${hdpartnr}" "$PERSISTENT_HOME"; then
- diskfm "$hdpartnr" "jfs xfs ext3" || continue
- mount -t auto -o noexec "${hdpartnr}" "$PERSISTENT_HOME" || continue
- fi
- HAVE_PERSISTENT_HOME=yes
- echo -e "${hdpartnr}\t${PERSISTENT_HOME}\tauto\t\tnoauto,noexec\t\t 0 0" >> "/etc/fstab"
-
-
- elif [ "${partid}" -eq 46 ]; then
- mkdir -p "/media/${hdpartnr#/dev/*}"
- #mount -t auto ${hdpartnr} /mnt/media/${hdpartnr#/dev/*} \n\
- #test -d /mnt/media/${hdpartnr#/dev/*}/home && \
- # ln -sf /media/${hdpartnr#/dev/*} /var/home
- echo -e "${hdpartnr}\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto\t\t 0 0" >> "/etc/fstab"
+read_partitions () {
+ # create the /etc/disk.partition file with all the partitions and respective id's (MSDOS and GPT)
+ echo "PARTITION - ID" > "/etc/disk.partition"
+ for hd in $(cat /proc/partitions | tr -s ' ' | cut -d ' ' -f5 | grep -o -e "[a-z]*$"); do
+ echo -n "$hd (" >> "/etc/disk.partition"
+ sfdisk -d /dev/$hd 2>&1 | grep 'GPT' > /dev/null
+ if [ $? -eq 1 ]; then
+ echo "MSDOS)" >> "/etc/disk.partition"
+ fdisk /dev/$hd -l | sed -n "/^\/dev\//p" | tr -d '*' | tr -s ' ' | cut -d ' ' -f1,5 >> "/etc/disk.partition"
+ else
+ echo "GPT)" >> "/etc/disk.partition"
+ for part in $(cat /proc/partitions | tr -s ' ' | cut -d ' ' -f5 | grep -o -e "$hd[0-9][0-9]*$"); do
+ LINE="/dev/$part "
+ LINE=${LINE}$(sgdisk /dev/$hd -i ${part:3} | grep 'GUID code' | cut -d ' ' -f4)
+ echo $LINE >> "/etc/disk.partition"
+ done
fi
done
+
+ echo "Partitions:"
+ cat "/etc/disk.partition"
+ echo "------------------------------------------------------"
+}
+
+# default partitions, if not specifies in config (note: size is irrelevant for setup_partitions)
+if [ -z "${SLX_PARTITION_TABLE}" ]; then
+ SLX_PARTITION_TABLE='
+ 44,10G,/tmp
+ 45,10G,/var/scratch
+ 82,4G'
+fi
+
+read_partitions
+
+for PARTITION in $SLX_PARTITION_TABLE; do
+ IFS=,
+ set $PARTITION
+ id=$1
+ shift
+ size=$1
+ shift
+ mountpoint="$1"
+ shift
+ options="$*"
+ unset IFS
+
+ case $id in
+ 44)
+ HAVE_TEMP="no"
+ TMP_SIZE=$size
+ for tmppart in $(grep -e "44$\|44000000-0000-0000-0000-000000000000$" /etc/disk.partition | cut -d ' ' -f1); do
+ echo "tmp partition found, formatting and mounting..."
+ if diskfm "$tmppart"; then
+ # echo "$tmppart is mounted to /mnt/tmp at $(sysup)" >/tmp/tmpready
+ mount_temp "$mopt" "$tmppart" || continue
+ echo "${tmppart}\t/tmp\t\tauto\t\tnoexec\t 0 0" >> "/etc/fstab"
+ HAVE_TEMP="yes"
+ echo "$tmppart mounted on /tmp"
+ else
+ echo "formatting tmp partition failed for some reason"
+ fi # Made this non-forking, systemd should handle it - 2013-05-28
+ done
+ ;;
+ 46)
+ for openslxpart in $(grep -e "46$\|46000000-0000-0000-0000-000000000000$" /etc/disk.partition | cut -d ' ' -f1); do
+ mkdir -p "/media/${openslxpart#/dev/*}"
+ #mount -t auto ${openslxpart} /mnt/media/${openslxpart#/dev/*} \n\
+ #test -d /mnt/media/${openslxpart#/dev/*}/home && \
+ #ln -sf /media/${openslxpart#/dev/*} /var/home
+ echo "${openslxpart}\t/media/${openslxpart#/dev/*}\tauto\t\tnoauto\t\t 0 0" >> "/etc/fstab"
+ echo "special partition ${openslxpart} mounted on /media/${openslxpart#/dev/*}"
+ done
+ ;;
+ 82)
+ # Check for standard swap partitions and make them available to the system
+ HAVE_SWAP=no
+ for swppart in $(grep -e "82$\|0657FD6D-A4AB-43C4-84E5-0933C84B4F4F$" /etc/disk.partition | cut -d ' ' -f1); do
+ echo -e "$swppart\tswap\t\tswap\t\tdefaults\t 0 0" >> "/etc/fstab"
+ mkswap "$swppart" && swapon "$swppart" -p 10 && HAVE_SWAP=yes # low priority, in case we have zram swap, prefer that)
+ [ $HAVE_SWAP = "yes" ] && echo "swap partition found and activated"
+ done
+ ;;
+ *)
+ for hdpartnr in $(grep -e "${id}$\|${id}000000-0000-0000-0000-000000000000$" /etc/disk.partition | cut -d ' ' -f1); do
+ mount_partition "${mountpoint}" $hdpartnr
+ mount_status=$?
+ if [ $mount_status -ne 0 ]; then
+ echo "Mount of partition $hdpartnr on ${mountpoint} failed with exit code: $mount_status"
+ [ -d "${mountpoint}" ] && rm -r "${mountpoint}"
+ else
+ echo "special partition $hdpartnr mounted on ${mountpoint}"
+ fi
+ done
+ ;;
+ esac
+ echo "------------------------------------------------------"
+done
+
+#Put detected linux partitions (83) into /etc/fstab with "noauto"
+for linuxpart in $(grep -e "83$\|0FC63DAF-8483-4772-8E79-3D69D8477DE4$" /etc/disk.partition | cut -d ' ' -f1); do
+ mountpoint="/media"
+ mkdir -p "${mountpoint}/${linuxpart#/dev/*}"
+ echo "${linuxpart}\t${mountpoint}/${linuxpart#/dev/*}\tauto\t\tnoauto,noexec\t 0 0" >> "/etc/fstab"
+ echo "linux partition ${linuxpart} mounted on ${mountpoint}/${linuxpart#/dev/*}"
+ echo "------------------------------------------------------"
done
-[ "$HAVE_PERSISTENT_BOOT" = "no" -a -d "$PERSISTENT_BOOT" ] && rm -f "$PERSISTENT_BOOT"
-[ "$HAVE_PERSISTENT_CACHE" = "no" -a -d "$PERSISTENT_CACHE" ] && rm -f "$PERSISTENT_CACHE"
-[ "$HAVE_PERSISTENT_HOME" = "no" -a -d "$PERSISTENT_HOME" ] && rm -f "$PERSISTENT_HOME"
mount -a
# Make huge tmpfs if nothing could be mounted for /tmp
if [ "$HAVE_TEMP" = "no" ]; then
- mount_temp -t tmpfs -o size=20G none
- slxlog "partition-temp" "Running /tmp on tmpfs only!" "/etc/disk.partition"
+ mount_temp -t tmpfs -o size=${TMP_SIZE} none
+ slxlog "partition-temp" "Running /tmp on tmpfs only!" "/etc/disk.partition"
fi
+
if [ "$HAVE_SWAP" = "no" ]; then
slxlog "partition-swap" "Have no (formatted) swap partition, using zram swap only!" "/etc/disk.partition"
fi
exit 0
-
diff --git a/remote/rootfs/rootfs-stage32/module.conf b/remote/rootfs/rootfs-stage32/module.conf
index 3a160a36..eab2b8f3 100644
--- a/remote/rootfs/rootfs-stage32/module.conf
+++ b/remote/rootfs/rootfs-stage32/module.conf
@@ -18,6 +18,11 @@ REQUIRED_BINARIES="
mkfs.xfs
mkfs.ext3
mkfs.ext4
+ fsck.ext3
+ fsck.ext4
+ fsck.jfs
+ fsck.xfs
+ fsck
blkid
modprobe
ps
@@ -38,6 +43,9 @@ REQUIRED_BINARIES="
getent
ldconfig
grep
+ sfdisk
+ sgdisk
+ dialog
"
REQUIRED_LIBRARIES="
libcap
diff --git a/server/configs/curitiba/partitioner b/server/configs/curitiba/partitioner
new file mode 120000
index 00000000..b45bce02
--- /dev/null
+++ b/server/configs/curitiba/partitioner
@@ -0,0 +1 @@
+../../modules/partitioner \ No newline at end of file
diff --git a/server/modules/cups-freiburg/etc/cups/ppd/ZRZ_DELL.ppd b/server/modules/cups-freiburg/etc/cups/ppd/ZRZ_DELL.ppd
index 6e042097..c66e36d1 100644
--- a/server/modules/cups-freiburg/etc/cups/ppd/ZRZ_DELL.ppd
+++ b/server/modules/cups-freiburg/etc/cups/ppd/ZRZ_DELL.ppd
@@ -5,13 +5,13 @@
*%
*% This file is published under the GNU General Public License
*%
-*% PPD-O-MATIC (3.0.0 or newer) generated this PPD file. It is for use with
+*% PPD-O-MATIC (4.0.0 or newer) generated this PPD file. It is for use with
*% all programs and environments which use PPD files for dealing with
*% printer capability information. The printer must be configured with the
-*% "foomatic-rip" backend filter script of Foomatic 3.0.0 or newer. This
+*% "foomatic-rip" backend filter script of Foomatic 4.0.0 or newer. This
*% file and "foomatic-rip" work together to support PPD-controlled printer
-*% driver option access with arbitrary free software printer drivers and
-*% printing spoolers.
+*% driver option access with all supported printer drivers and printing
+*% spoolers.
*%
*% To save this file on your disk, wait until the download has completed
*% (the animation of the browser logo must stop) and then use the
@@ -20,24 +20,25 @@
*% DO NOT cut and paste this file into an editor with your mouse. This can
*% introduce additional line breaks which lead to unexpected results.
*%
-*% You may save this file as 'Dell-3100cn-Postscript.ppd'
+*% You may save this file as 'Dell-3100cn-pxlcolor.ppd'
*%
*%
*FormatVersion: "4.3"
*FileVersion: "1.1"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
-*PCFileName: "POSTSCRI.PPD"
+*PCFileName: "PXLCOLOR.PPD"
*Manufacturer: "Dell"
*Product: "(Laser Printer 3100cn)"
*cupsVersion: 1.0
*cupsManualCopies: True
*cupsModelNumber: 2
-*cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip"
+*cupsFilter: "application/vnd.cups-postscript 100 foomatic-rip"
+*cupsFilter: "application/vnd.cups-pdf 0 foomatic-rip"
*%pprRIP: foomatic-rip other
*ModelName: "Dell 3100cn"
-*ShortNickName: "Dell 3100cn Postscript"
-*NickName: "Dell 3100cn Foomatic/Postscript"
+*ShortNickName: "Dell 3100cn pxlcolor"
+*NickName: "Dell 3100cn Foomatic/pxlcolor (recommended)"
*PSVersion: "(3010.000) 550"
*PSVersion: "(3010.000) 651"
*PSVersion: "(3010.000) 652"
@@ -45,6 +46,14 @@
*PSVersion: "(3010.000) 704"
*PSVersion: "(3010.000) 705"
*PSVersion: "(3010.000) 800"
+*PSVersion: "(3010.000) 815"
+*PSVersion: "(3010.000) 850"
+*PSVersion: "(3010.000) 860"
+*PSVersion: "(3010.000) 861"
+*PSVersion: "(3010.000) 862"
+*PSVersion: "(3010.000) 863"
+*PSVersion: "(3010.000) 864"
+*PSVersion: "(3010.000) 870"
*LanguageLevel: "3"
*ColorDevice: True
*DefaultColorSpace: RGB
@@ -52,63 +61,151 @@
*Throughput: "1"
*LandscapeOrientation: Plus90
*TTRasterizer: Type42
-*1284DeviceID: "MFG:Dell;MDL:Laser Printer 3100cn;CMD:PJL,RASTER,DOWNLOAD,PCLXL,PCL,POSTSCRIPT;DES:Dell Laser Printer 3100cn;DRV:DPostscript,R0,M0,TP;"
+*1284DeviceID: "MFG:Dell;MDL:Laser Printer 3100cn;CMD:PJL,RASTER,DOWNLOAD,PCLXL,PCL,POSTSCRIPT;DES:Dell Laser Printer 3100cn;DRV:Dpxlcolor,R1,M0,TG;"
-*driverName Postscript/Postscript: ""
-*driverType P/PostScript: ""
-*driverUrl: "http://partners.adobe.com/public/developer/ps/index_specs.html"
+*driverName pxlcolor: ""
+*driverType G/Ghostscript built-in: ""
+*driverUrl: "http://www.ghostscript.com/"
*driverObsolete: False
+*driverManufacturerSupplied: False
+*DefaultResolution: 1200dpi
-*VariablePaperSize: False
+*HWMargins: 18 36 18 36
+*VariablePaperSize: True
+*MaxMediaWidth: 100000
+*MaxMediaHeight: 100000
+*NonUIOrderDependency: 100 AnySetup *CustomPageSize
+*CustomPageSize True: "pop pop pop pop pop
+%% FoomaticRIPOptionSetting: PageSize=Custom"
+*End
+*FoomaticRIPOptionSetting PageSize=Custom: " -dDEVICEWIDTHPOINTS=0 -dD&&
+EVICEHEIGHTPOINTS=0"
+*End
+*ParamCustomPageSize Width: 1 points 36 100000
+*ParamCustomPageSize Height: 2 points 36 100000
+*ParamCustomPageSize Orientation: 3 int 0 0
+*ParamCustomPageSize WidthOffset: 4 points 0 0
+*ParamCustomPageSize HeightOffset: 5 points 0 0
-*FoomaticIDs: Dell-3100cn Postscript
-*FoomaticRIPCommandLine: "/opt/openslx/bin/cat%A%B%Z"
-*FoomaticRIPNoPageAccounting: True
+*FoomaticIDs: Dell-3100cn pxlcolor
+*FoomaticRIPCommandLine: "gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -dNO&&
+INTERPOLATE%B%A%Z -sOutputFile=- -"
+*End
*OpenGroup: General/General
+*OpenUI *PrintoutMode/Print Quality: PickOne
+*FoomaticRIPOption PrintoutMode: enum Composite A
+*OrderDependency: 10 AnySetup *PrintoutMode
+*DefaultPrintoutMode: Normal
+*PrintoutMode Draft/Draft: "%% FoomaticRIPOptionSetting: PrintoutMode=Draft"
+*FoomaticRIPOptionSetting PrintoutMode=Draft: "PrinterResolution=600x6&&
+00dpi ColorModel=Color"
+*End
+*PrintoutMode Draft.Gray/Draft Grayscale: "%% FoomaticRIPOptionSetting: PrintoutMode=Draft.Gray"
+*FoomaticRIPOptionSetting PrintoutMode=Draft.Gray: "PrinterResolution=&&
+600x600dpi ColorModel=Grayscale"
+*End
+*PrintoutMode Normal/Normal: "%% FoomaticRIPOptionSetting: PrintoutMode=Normal"
+*FoomaticRIPOptionSetting PrintoutMode=Normal: "PrinterResolution=600x&&
+600dpi ColorModel=Color"
+*End
+*PrintoutMode Normal.Gray/Normal Grayscale: "%% FoomaticRIPOptionSetting: PrintoutMode=Normal.Gray"
+*FoomaticRIPOptionSetting PrintoutMode=Normal.Gray: "PrinterResolution&&
+=600x600dpi ColorModel=Grayscale"
+*End
+*PrintoutMode High/High Quality: "%% FoomaticRIPOptionSetting: PrintoutMode=High"
+*FoomaticRIPOptionSetting PrintoutMode=High: "PrinterResolution=1200x1&&
+200dpi ColorModel=Color"
+*End
+*PrintoutMode High.Gray/High Quality Grayscale: "%% FoomaticRIPOptionSetting: PrintoutMode=High.Gray"
+*FoomaticRIPOptionSetting PrintoutMode=High.Gray: "PrinterResolution=1&&
+200x1200dpi ColorModel=Grayscale"
+*End
+*CloseUI: *PrintoutMode
+
*OpenUI *PageSize/Page Size: PickOne
+*FoomaticRIPOption PageSize: enum CmdLine A
*OrderDependency: 100 AnySetup *PageSize
*DefaultPageSize: A4
-*PageSize A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
-*PageSize Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
-*PageSize 11x17/11x17: "<</PageSize[792 1224]/ImagingBBox null>>setpagedevice"
-*PageSize A3/A3: "<</PageSize[842 1191]/ImagingBBox null>>setpagedevice"
-*PageSize A5/A5: "<</PageSize[421 595]/ImagingBBox null>>setpagedevice"
-*PageSize B5/B5 (JIS): "<</PageSize[516 729]/ImagingBBox null>>setpagedevice"
-*PageSize Env10/Envelope #10: "<</PageSize[297 684]/ImagingBBox null>>setpagedevice"
-*PageSize EnvC5/Envelope C5: "<</PageSize[459 649]/ImagingBBox null>>setpagedevice"
-*PageSize EnvDL/Envelope DL: "<</PageSize[312 624]/ImagingBBox null>>setpagedevice"
-*PageSize EnvISOB5/Envelope B5: "<</PageSize[499 709]/ImagingBBox null>>setpagedevice"
-*PageSize EnvMonarch/Envelope Monarch: "<</PageSize[279 540]/ImagingBBox null>>setpagedevice"
-*PageSize Executive/Executive: "<</PageSize[522 756]/ImagingBBox null>>setpagedevice"
-*PageSize Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
+*PageSize Letter/US Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter"
+*FoomaticRIPOptionSetting PageSize=Letter: " -dDEVICEWIDTHPOINTS=612 -&&
+dDEVICEHEIGHTPOINTS=792"
+*End
+*PageSize A4/A4: "%% FoomaticRIPOptionSetting: PageSize=A4"
+*FoomaticRIPOptionSetting PageSize=A4: " -dDEVICEWIDTHPOINTS=595 -dDEV&&
+ICEHEIGHTPOINTS=842"
+*End
+*PageSize 11x17/11x17: "%% FoomaticRIPOptionSetting: PageSize=11x17"
+*FoomaticRIPOptionSetting PageSize=11x17: " -dDEVICEWIDTHPOINTS=792 -d&&
+DEVICEHEIGHTPOINTS=1224"
+*End
+*PageSize A3/A3: "%% FoomaticRIPOptionSetting: PageSize=A3"
+*FoomaticRIPOptionSetting PageSize=A3: " -dDEVICEWIDTHPOINTS=842 -dDEV&&
+ICEHEIGHTPOINTS=1191"
+*End
+*PageSize A5/A5: "%% FoomaticRIPOptionSetting: PageSize=A5"
+*FoomaticRIPOptionSetting PageSize=A5: " -dDEVICEWIDTHPOINTS=421 -dDEV&&
+ICEHEIGHTPOINTS=595"
+*End
+*PageSize B5/B5 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B5"
+*FoomaticRIPOptionSetting PageSize=B5: " -dDEVICEWIDTHPOINTS=516 -dDEV&&
+ICEHEIGHTPOINTS=729"
+*End
+*PageSize Env10/Envelope #10: "%% FoomaticRIPOptionSetting: PageSize=Env10"
+*FoomaticRIPOptionSetting PageSize=Env10: " -dDEVICEWIDTHPOINTS=297 -d&&
+DEVICEHEIGHTPOINTS=684"
+*End
+*PageSize EnvC5/Envelope C5: "%% FoomaticRIPOptionSetting: PageSize=EnvC5"
+*FoomaticRIPOptionSetting PageSize=EnvC5: " -dDEVICEWIDTHPOINTS=459 -d&&
+DEVICEHEIGHTPOINTS=649"
+*End
+*PageSize EnvDL/Envelope DL: "%% FoomaticRIPOptionSetting: PageSize=EnvDL"
+*FoomaticRIPOptionSetting PageSize=EnvDL: " -dDEVICEWIDTHPOINTS=312 -d&&
+DEVICEHEIGHTPOINTS=624"
+*End
+*PageSize EnvISOB5/Envelope B5: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB5"
+*FoomaticRIPOptionSetting PageSize=EnvISOB5: " -dDEVICEWIDTHPOINTS=499&&
+ -dDEVICEHEIGHTPOINTS=709"
+*End
+*PageSize EnvMonarch/Envelope Monarch: "%% FoomaticRIPOptionSetting: PageSize=EnvMonarch"
+*FoomaticRIPOptionSetting PageSize=EnvMonarch: " -dDEVICEWIDTHPOINTS=2&&
+79 -dDEVICEHEIGHTPOINTS=540"
+*End
+*PageSize Executive/Executive: "%% FoomaticRIPOptionSetting: PageSize=Executive"
+*FoomaticRIPOptionSetting PageSize=Executive: " -dDEVICEWIDTHPOINTS=52&&
+2 -dDEVICEHEIGHTPOINTS=756"
+*End
+*PageSize Legal/US Legal: "%% FoomaticRIPOptionSetting: PageSize=Legal"
+*FoomaticRIPOptionSetting PageSize=Legal: " -dDEVICEWIDTHPOINTS=612 -d&&
+DEVICEHEIGHTPOINTS=1008"
+*End
*CloseUI: *PageSize
*OpenUI *PageRegion: PickOne
*OrderDependency: 100 AnySetup *PageRegion
*DefaultPageRegion: A4
-*PageRegion A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
-*PageRegion Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
-*PageRegion 11x17/11x17: "<</PageSize[792 1224]/ImagingBBox null>>setpagedevice"
-*PageRegion A3/A3: "<</PageSize[842 1191]/ImagingBBox null>>setpagedevice"
-*PageRegion A5/A5: "<</PageSize[421 595]/ImagingBBox null>>setpagedevice"
-*PageRegion B5/B5 (JIS): "<</PageSize[516 729]/ImagingBBox null>>setpagedevice"
-*PageRegion Env10/Envelope #10: "<</PageSize[297 684]/ImagingBBox null>>setpagedevice"
-*PageRegion EnvC5/Envelope C5: "<</PageSize[459 649]/ImagingBBox null>>setpagedevice"
-*PageRegion EnvDL/Envelope DL: "<</PageSize[312 624]/ImagingBBox null>>setpagedevice"
-*PageRegion EnvISOB5/Envelope B5: "<</PageSize[499 709]/ImagingBBox null>>setpagedevice"
-*PageRegion EnvMonarch/Envelope Monarch: "<</PageSize[279 540]/ImagingBBox null>>setpagedevice"
-*PageRegion Executive/Executive: "<</PageSize[522 756]/ImagingBBox null>>setpagedevice"
-*PageRegion Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
+*PageRegion Letter/US Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter"
+*PageRegion A4/A4: "%% FoomaticRIPOptionSetting: PageSize=A4"
+*PageRegion 11x17/11x17: "%% FoomaticRIPOptionSetting: PageSize=11x17"
+*PageRegion A3/A3: "%% FoomaticRIPOptionSetting: PageSize=A3"
+*PageRegion A5/A5: "%% FoomaticRIPOptionSetting: PageSize=A5"
+*PageRegion B5/B5 (JIS): "%% FoomaticRIPOptionSetting: PageSize=B5"
+*PageRegion Env10/Envelope #10: "%% FoomaticRIPOptionSetting: PageSize=Env10"
+*PageRegion EnvC5/Envelope C5: "%% FoomaticRIPOptionSetting: PageSize=EnvC5"
+*PageRegion EnvDL/Envelope DL: "%% FoomaticRIPOptionSetting: PageSize=EnvDL"
+*PageRegion EnvISOB5/Envelope B5: "%% FoomaticRIPOptionSetting: PageSize=EnvISOB5"
+*PageRegion EnvMonarch/Envelope Monarch: "%% FoomaticRIPOptionSetting: PageSize=EnvMonarch"
+*PageRegion Executive/Executive: "%% FoomaticRIPOptionSetting: PageSize=Executive"
+*PageRegion Legal/US Legal: "%% FoomaticRIPOptionSetting: PageSize=Legal"
*CloseUI: *PageRegion
*DefaultImageableArea: A4
-*ImageableArea A4/A4: "18 36 577 806"
*ImageableArea Letter/US Letter: "18 36 594 756"
+*ImageableArea A4/A4: "18 36 577 806"
*ImageableArea 11x17/11x17: "18 36 774 1188"
*ImageableArea A3/A3: "18 36 824 1155"
*ImageableArea A5/A5: "18 36 403 559"
@@ -122,8 +219,8 @@
*ImageableArea Legal/US Legal: "18 36 594 972"
*DefaultPaperDimension: A4
-*PaperDimension A4/A4: "595 842"
*PaperDimension Letter/US Letter: "612 792"
+*PaperDimension A4/A4: "595 842"
*PaperDimension 11x17/11x17: "792 1224"
*PaperDimension A3/A3: "842 1191"
*PaperDimension A5/A5: "421 595"
@@ -136,25 +233,70 @@
*PaperDimension Executive/Executive: "522 756"
*PaperDimension Legal/US Legal: "612 1008"
-*OpenUI *Resolution/Resolution: PickOne
-*OrderDependency: 110 AnySetup *Resolution
-*DefaultResolution: Unknown
-*Resolution 150x150dpi/150 DPI: "<</HWResolution[150 150]>>setpagedevice"
-*Resolution 300x300dpi/300 DPI: "<</HWResolution[300 300]>>setpagedevice"
-*Resolution 600x600dpi/600 DPI: "<</HWResolution[600 600]>>setpagedevice"
-*Resolution 1200x1200dpi/1200 DPI: "<</HWResolution[1200 1200]>>setpagedevice"
-*CloseUI: *Resolution
+*OpenUI *InputSlot/Media Source: PickOne
+*FoomaticRIPOption InputSlot: enum CmdLine A
+*OrderDependency: 100 AnySetup *InputSlot
+*DefaultInputSlot: Default
+*InputSlot Default/Printer Default: "%% FoomaticRIPOptionSetting: InputSlot=Default"
+*FoomaticRIPOptionSetting InputSlot=Default: " -dMediaPosition=0"
+*InputSlot Upper/Upper Tray: "%% FoomaticRIPOptionSetting: InputSlot=Upper"
+*FoomaticRIPOptionSetting InputSlot=Upper: " -dMediaPosition=4"
+*InputSlot Middle/Middle Tray: "%% FoomaticRIPOptionSetting: InputSlot=Middle"
+*FoomaticRIPOptionSetting InputSlot=Middle: " -dMediaPosition=5"
+*InputSlot Lower/Lower Tray: "%% FoomaticRIPOptionSetting: InputSlot=Lower"
+*FoomaticRIPOptionSetting InputSlot=Lower: " -dMediaPosition=6"
+*InputSlot Multipurpose/Multipurpose Tray: "%% FoomaticRIPOptionSetting: InputSlot=Multipurpose"
+*FoomaticRIPOptionSetting InputSlot=Multipurpose: " -dMediaPosition=3"
+*InputSlot Automatic/Automatic: "%% FoomaticRIPOptionSetting: InputSlot=Automatic"
+*FoomaticRIPOptionSetting InputSlot=Automatic: " -dMediaPosition=1"
+*InputSlot Manual/Manual Feeder: "%% FoomaticRIPOptionSetting: InputSlot=Manual"
+*FoomaticRIPOptionSetting InputSlot=Manual: " -dMediaPosition=2"
+*CloseUI: *InputSlot
*OpenUI *Duplex/Double-Sided Printing: PickOne
-*OrderDependency: 130 AnySetup *Duplex
-*DefaultDuplex: DuplexTumble
-*Duplex DuplexNoTumble/Long Edge (Standard): "<</Duplex true /Tumble false>>setpagedevice"
-*Duplex DuplexTumble/Short Edge (Flip): "<</Duplex true /Tumble true>>setpagedevice"
-*Duplex None/Off: "<</Duplex false>>setpagedevice"
+*FoomaticRIPOption Duplex: enum CmdLine A
+*OrderDependency: 100 AnySetup *Duplex
+*DefaultDuplex: None
+*Duplex DuplexNoTumble/On (Flip on Long Edge): "%% FoomaticRIPOptionSetting: Duplex=DuplexNoTumble"
+*FoomaticRIPOptionSetting Duplex=DuplexNoTumble: " -dDuplex"
+*Duplex DuplexTumble/On (Flip on Short Edge): "%% FoomaticRIPOptionSetting: Duplex=DuplexTumble"
+*FoomaticRIPOptionSetting Duplex=DuplexTumble: " -dDuplex -dTumble"
+*Duplex None/Off: "%% FoomaticRIPOptionSetting: Duplex=None"
+*FoomaticRIPOptionSetting Duplex=None: ""
*CloseUI: *Duplex
*CloseGroup: General
+*OpenGroup: PrintoutMode/Printout Mode
+
+*OpenUI *ColorModel/Color Mode: PickOne
+*FoomaticRIPOption ColorModel: enum CmdLine B
+*OrderDependency: 100 AnySetup *ColorModel
+*DefaultColorModel: FromPrintoutMode
+*ColorModel FromPrintoutMode/Controlled by 'Print Quality': "%% FoomaticRIPOptionSetting: ColorModel=@PrintoutMode"
+*ColorModel Color/Color: "%% FoomaticRIPOptionSetting: ColorModel=Color"
+*FoomaticRIPOptionSetting ColorModel=Color: " -sDEVICE=pxlcolor"
+*ColorModel Grayscale/Monochrome: "%% FoomaticRIPOptionSetting: ColorModel=Grayscale"
+*FoomaticRIPOptionSetting ColorModel=Grayscale: " -sDEVICE=pxlmono"
+*CloseUI: *ColorModel
+
+*OpenUI *PrinterResolution/Resolution: PickOne
+*FoomaticRIPOption PrinterResolution: enum CmdLine A
+*OrderDependency: 100 AnySetup *PrinterResolution
+*DefaultPrinterResolution: FromPrintoutMode
+*PrinterResolution FromPrintoutMode/Controlled by 'Print Quality': "%% FoomaticRIPOptionSetting: PrinterResolution=@PrintoutMode"
+*PrinterResolution 300x300dpi/300x300 DPI: "%% FoomaticRIPOptionSetting: PrinterResolution=300x300dpi"
+*FoomaticRIPOptionSetting PrinterResolution=300x300dpi: " -r300x300"
+*PrinterResolution 600x600dpi/600x600 DPI: "%% FoomaticRIPOptionSetting: PrinterResolution=600x600dpi"
+*FoomaticRIPOptionSetting PrinterResolution=600x600dpi: " -r600x600"
+*PrinterResolution 1200x1200dpi/1200x1200 DPI: "%% FoomaticRIPOptionSetting: PrinterResolution=1200x1200dpi"
+*FoomaticRIPOptionSetting PrinterResolution=1200x1200dpi: " -r1200x120&&
+0"
+*End
+*CloseUI: *PrinterResolution
+
+*CloseGroup: PrintoutMode
+
*% Generic boilerplate PPD stuff as standard PostScript fonts and so on
@@ -195,3 +337,4 @@
*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
*Font ZapfDingbats: Special "(001.004S)" Standard ROM
+
diff --git a/server/modules/openstack-pam-hooks/opt/openslx/scripts/pam_script_auth.d/00-openstack b/server/modules/openstack-pam-hooks/opt/openslx/scripts/pam_script_auth.d/00-openstack
new file mode 100644
index 00000000..fc784208
--- /dev/null
+++ b/server/modules/openstack-pam-hooks/opt/openslx/scripts/pam_script_auth.d/00-openstack
@@ -0,0 +1,6 @@
+# To be sourced by /opt/openslx/scripts/pam_script_auth only
+
+# Stop the virtualization environment
+systemctl stop nova-compute.service &
+systemctl stop libvirt-bin.service &
+systemctl stop neutron-plugin-openvswitch-agent.service &
diff --git a/server/modules/openstack-pam-hooks/opt/openslx/scripts/pam_script_ses_close.d/00-openstack b/server/modules/openstack-pam-hooks/opt/openslx/scripts/pam_script_ses_close.d/00-openstack
new file mode 100644
index 00000000..34c6080a
--- /dev/null
+++ b/server/modules/openstack-pam-hooks/opt/openslx/scripts/pam_script_ses_close.d/00-openstack
@@ -0,0 +1,9 @@
+# To be sourced by /opt/openslx/scripts/pam_script_ses_close only
+
+# Start the virtualization environment again
+# check if another user is logged in
+if [ -z "$(who |grep '^[^root]')" ]; then
+ systemctl start nova-compute.service &
+ systemctl start libvirt-bin.service &
+ systemctl start neutron-plugin-openvswitch-agent.service &
+fi
diff --git a/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_mount_persistent b/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_mount_persistent
index 7961f561..dbe6ef01 100644
--- a/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_mount_persistent
+++ b/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_mount_persistent
@@ -25,7 +25,7 @@ if ! grep -q "^${PAM_USER}:" "/etc/passwd"; then
SIGNAL=$(mktemp)
MOUNT_OUTPUT=$(mktemp)
rm -f -- "${SIGNAL}"
- ( mount ${MOUNT_OPTS} "${CIFS_VOLUME}" "${PERSISTENT_HOME_DIR}" > "$MOUNT_OUTPUT" 2>&1 || touch "${SIGNAL}" ) &
+ ( mount -v ${MOUNT_OPTS} "${CIFS_VOLUME}" "${PERSISTENT_HOME_DIR}" > "$MOUNT_OUTPUT" 2>&1 || touch "${SIGNAL}" ) &
MOUNT_PID=$!
for COUNTER in 1 2 4 4; do
kill -0 "${MOUNT_PID}" 2>/dev/null || break
@@ -78,7 +78,7 @@ if ! grep -q "^${PAM_USER}:" "/etc/passwd"; then
SIGNAL=$(mktemp)
MOUNT_OUTPUT=$(mktemp)
rm -f -- "${SIGNAL}"
- ( mount ${MOUNT_OPTS} "${FILESERVER}:${VOLUME}" "${PERSISTENT_HOME_DIR}" > "$MOUNT_OUTPUT" 2>&1 || touch "${SIGNAL}" ) &
+ ( mount -v ${MOUNT_OPTS} "${FILESERVER}:${VOLUME}" "${PERSISTENT_HOME_DIR}" > "$MOUNT_OUTPUT" 2>&1 || touch "${SIGNAL}" ) &
MOUNT_PID=$!
for COUNTER in 1 2 4 4; do
kill -0 "${MOUNT_PID}" 2>/dev/null || break
diff --git a/server/modules/partitioner/etc/systemd/system/multi-user.target.wants/partitioner.service b/server/modules/partitioner/etc/systemd/system/multi-user.target.wants/partitioner.service
new file mode 120000
index 00000000..48defa3e
--- /dev/null
+++ b/server/modules/partitioner/etc/systemd/system/multi-user.target.wants/partitioner.service
@@ -0,0 +1 @@
+../partitioner.service \ No newline at end of file
diff --git a/server/modules/partitioner/etc/systemd/system/partitioner.service b/server/modules/partitioner/etc/systemd/system/partitioner.service
new file mode 100644
index 00000000..85b41597
--- /dev/null
+++ b/server/modules/partitioner/etc/systemd/system/partitioner.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Runs the OpenSLX Partitioning Tool
+After=killsplash.service
+After=systemd-vconsole-setup.service
+Before=display-manager.service getty@tty1.service getty@ttyUSB0.service
+Before=serial-getty@ttyS0.service serial-getty@ttyO0.service serial-getty@ttyO2.service
+Before=serial-getty@ttyAMA0.service serial-getty@ttymxc0.service serial-getty@ttymxc3.service
+Conflicts=killsplash.service
+ConditionKernelCommandLine=partitioner
+
+[Service]
+Type=oneshot
+ExecStart=/opt/openslx/scripts/systemd-partitioner
+TimeoutSec=0
+RemainAfterExit=yes
+SysVStartPriority=99
+StandardInput=tty
+StandardOutput=tty
+StandardError=syslog
+
diff --git a/server/modules/partitioner/opt/openslx/scripts/systemd-partitioner b/server/modules/partitioner/opt/openslx/scripts/systemd-partitioner
new file mode 100755
index 00000000..d8fa0c6d
--- /dev/null
+++ b/server/modules/partitioner/opt/openslx/scripts/systemd-partitioner
@@ -0,0 +1,497 @@
+#!/bin/ash
+# Copyright (c) 2013 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your feedback to feedback@openslx.org
+#
+# General information about OpenSLX can be found under http://openslx.org
+#
+# Local hard disk autodetection script for OpenSLX linux stateless clients,
+# detecting swap and special partitions
+
+#############################################################################
+
+perror () {
+ echo "ERROR: $@" 1>&2
+ if [ "$SLX_AUTOMATIC_PARTITIONING" != "yes" ]; then
+ dialog --title "ERROR" --stdout --msgbox "$@" 15 60
+ else
+ dialog --title "ERROR" --no-cancel --stdout --pause "$@\n\nReboot in:" 15 60 600
+ reboot
+ fi
+ exit 1
+}
+
+pwarning () {
+ echo "WARNING: $@" 1>&2
+ if [ "$SLX_AUTOMATIC_PARTITIONING" != "yes" ]; then
+ dialog --title "WARNING" --stdout --msgbox "$@" 15 60
+ else
+ dialog --title "WARNING" --stdout --infobox "$@" 15 60
+ sleep 5
+ fi
+}
+
+. /opt/openslx/config || perror "Could not source config."
+
+#set -x
+#exec > /log 2>&1
+
+
+#--------------------------------------------------------------------------------------
+#Gathering partition information
+
+# BLOCKSIZE=$(sfdisk -l /dev/$SLX_CHOOSEN_DISK | grep -o -e "blocks of [0-9]* bytes" | cut -d ' ' -f3)
+BLOCKSIZE=1024
+
+# pick the size of a sector (usually 512 bytes)
+# SECTORSIZE=$(sfdisk /dev/$SLX_CHOOSEN_DISK -l -u S 2> /dev/null | grep Units | cut -d ' ' -f5)
+SECTORSIZE=512
+
+# Partition that should be set as extended partition (only partitions 2-4 can be extended partitions)
+EXTENDED_PARTITION_NR=4
+
+PARTITIONSPATH="/proc/partitions"
+# picking disk that will be used
+DISKS=$(cat $PARTITIONSPATH | tr -s ' ' | cut -d ' ' -f5 | grep -e "[a-z]$")
+if [ -z "$DISKS" ]; then
+ perror "Can't find an hard disk."
+fi
+#--------------------------------------------------------------------------------------
+
+define_partition_table() {
+ if [ -z "$SLX_PARTITION_TABLE" ]; then
+ SLX_PARTITION_TABLE='
+ 44,10G,/tmp
+ 45,10G,/var/scratch
+ 82,4G'
+ pwarning "You didn't define a partition table in config. Using default partition table:\n$SLX_PARTITION_TABLE"
+ fi
+}
+
+size_conv() {
+ [ $(echo "$1<1024" | bc) -eq 1 ] && { echo "$1 B"; exit 0; }
+ local result="$(echo $1 | awk '{ sum=$1; hum[1024^3]="GB"; hum[1024^2]="MB"; hum[1024]="KB";
+ for (x=1024^3; x>=1024; x/=1024){
+ if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break }
+ }
+ }')"
+ echo $result
+}
+
+choose_disk() {
+ local disk_number=$(echo $DISKS | tr ' ' \\n | wc -l)
+ if [ "$SLX_AUTOMATIC_PARTITIONING" = "yes" ]; then
+ if [ -n "$SLX_CHOOSEN_DISK" ]; then
+ echo $DISKS | grep -wq "$SLX_CHOOSEN_DISK" || perror "ERROR: Automatic partitioning enabled, but in config specified $SLX_CHOOSEN_DISK was not found."
+ elif [ "$disk_number" -eq 1 ]; then
+ SLX_CHOOSEN_DISK=$DISKS
+ pwarning "Automatic partitioning enabled, but SLX_CHOOSEN_DISK not specified in config. Choosing only existing disk: $DISKS for partitioning."
+ else
+ perror "Automatic partitioning enabled, but SLX_CHOOSEN_DISK not specified in config. More than one disk exists, please specify disk in config and run again."
+ fi
+ else
+ local dialog_string="Existing disks with partition tables:\n\n"
+ local disksize=""
+ local freespace=0
+ local parts=""
+ local partsize=0
+ local used=0
+ local options=""
+
+ for disk in $DISKS; do
+ disksize=$(echo "$(cat $PARTITIONSPATH | grep -e $disk$ | tr -s ' ' | cut -d ' ' -f4)*$BLOCKSIZE" | bc)
+ parts=$(cat $PARTITIONSPATH | grep -e $disk[0-9] | tr -s ' ' | cut -d ' ' -f5)
+ dialog_string="${dialog_string}$disk $(size_conv $disksize)\n"
+ used=0
+ options="${options}$disk $disk "
+
+ for part in $parts; do
+ partsize=$(echo "$(cat $PARTITIONSPATH | grep -e $part$ | tr -s ' ' | cut -d ' ' -f4)*$BLOCKSIZE" | bc)
+ used=$(echo "$used+$partsize" | bc)
+ dialog_string="${dialog_string} $part $(size_conv $partsize)\n"
+ done
+
+ dialog_string=$dialog_string"--------------------------------\n"
+ freespace=$(echo "$disksize-$used" | bc)
+ dialog_string="${dialog_string}Used $(size_conv $used)\n"
+ dialog_string="${dialog_string}Free $(size_conv $freespace)\n\n"
+ done
+
+ if [ $(echo $DISKS | tr ' ' \\n | wc -l) -gt 0 ]; then
+ SLX_CHOOSEN_DISK=$(echo $options | xargs dialog --title "Choose a disk to partition:" --no-tags --cr-wrap --no-collapse --stdout --menu "${dialog_string}" 0 0 0)
+ if [ -z $SLX_CHOOSEN_DISK ]; then
+ pwarning "Partitioning aborted by user."
+ exit 1
+ fi
+ else
+ perror "Can't find a hard disk."
+ fi
+ fi
+ CHOOSEN_DISK_SIZE=$(echo "$(cat $PARTITIONSPATH | grep -e $SLX_CHOOSEN_DISK$ | tr -s ' ' | cut -d ' ' -f4)*$BLOCKSIZE" | bc)
+ CHOOSEN_DISK_PARTS=$(cat $PARTITIONSPATH | grep -e $SLX_CHOOSEN_DISK[0-9] | tr -s ' ' | cut -d ' ' -f5)
+}
+
+check_disk_size() {
+ # check if the choosen disk is greater than the new partition table size.
+ local part_number=$(echo $SLX_PARTITION_TABLE | wc -w)
+ local part_space=$(echo $SLX_PARTITION_TABLE | grep -oE '[0-9]+G' | awk '{ SUM += $0 } END { print SUM }')
+ NEEDED_DISK_SPACE=$(echo "$part_space*1024*1024*1024+$part_number*1024*1024" | bc)
+
+ if [ $(echo "$CHOOSEN_DISK_SIZE<$NEEDED_DISK_SPACE" | bc) -eq 1 ]; then
+ perror "Insufficient space on disk /dev/$SLX_CHOOSEN_DISK\n DISK SIZE: $(size_conv $CHOOSEN_DISK_SIZE)\n REQUIRED SIZE: $(size_conv $NEEDED_DISK_SPACE)"
+ fi
+}
+
+select_partition_type() {
+ # choosing the partition type (MSDOS or GPT) if it wasn't set in config file
+ if [ -z "$SLX_PARTITION_TYPE" ]; then
+ if [ "$SLX_AUTOMATIC_PARTITIONING" = "yes" ]; then
+ pwarning "SLX_PARTITION_TYPE not defined in config, using default: msdos"
+ SLX_PARTITION_TYPE=msdos
+ else
+ SLX_PARTITION_TYPE=$(dialog --no-tags --title "Choose a partition type:" --menu --stdout "Partitions types:" 0 0 0 "msdos" " MSDOS " "GPT" " GPT ")
+ if [ -z $SLX_PARTITION_TYPE ]; then
+ pwarning "Partitioning aborted by user."
+ exit 1
+ fi
+ fi
+ fi
+}
+
+confirm_partitioning() {
+ local dialog_string="New partition table after partitioning:\n\n"
+ local counter=1
+ local id=0
+ local size=0
+ local mountpoint=""
+ local bootable=0
+ local part_type="Primary"
+ for part in $SLX_PARTITION_TABLE; do
+ IFS=,
+ set $part
+
+ id=$1
+ shift
+ size=${1%G}
+ shift
+ [ -n $1 ] && mountpoint=$1
+ shift
+ case "$*" in
+ *bootable*) bootable=1 ;;
+ *) bootable=0 ;;
+ esac
+
+ [ "$id" = "82" ] && mountpoint="swap"
+
+ if [ $SLX_PARTITION_TYPE = 'GPT' ]; then
+ #update dialog status
+ dialog_string="${dialog_string}${mountpoint} (/dev/"${SLX_CHOOSEN_DISK}${counter}")\n"
+ if [ "${id}" = "82" ]; then
+ dialog_string="${dialog_string} GUID: 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F\n"
+ elif [ "${id}" = "83" ]; then
+ dialog_string="${dialog_string} GUID: 0FC63DAF-8483-4772-8E79-3D69D8477DE4\n"
+ else
+ dialog_string="${dialog_string} GUID: "$id"000000-0000-0000-0000-000000000000\n"
+ fi
+ dialog_string="${dialog_string} Size: "$size" GB\n"
+ else
+ if [ $counter -eq $EXTENDED_PARTITION_NR ]; then
+ part_type="Logical"
+ counter=$(($counter+1))
+ fi
+ #update dialog
+ dialog_string="${dialog_string}$mountpoint (/dev/${SLX_CHOOSEN_DISK}$counter)\n"
+ dialog_string="${dialog_string} Type: $part_type\n"
+ dialog_string="${dialog_string} ID: $id\n"
+ dialog_string="${dialog_string} Size: $size GB\n"
+ fi
+
+ counter=$(($counter+1))
+ done
+ unset IFS
+
+ dialog_string="${dialog_string}\nAll existing partitions on /dev/$SLX_CHOOSEN_DISK will be deleted, continue?"
+
+ # asking confirmation to create the partitions
+ dialog --title "WARNING" --stdout --defaultno --yesno "$dialog_string" 0 0
+ if [ $? -eq 1 ]; then
+ pwarning "Partitioning aborted by user."
+ exit 1
+ fi
+}
+
+# function to create gpt type partition tables (uses sgdisk)
+partition_disk_gpt() {
+ # delete partition table
+ sgdisk -Z /dev/$SLX_CHOOSEN_DISK > /dev/null 2>&1 || perror "Error erasing old partition table"
+
+ #set dialog
+ dialog_string="Partitions created:\n\n"
+ echo "0" | dialog --title "Partitioner" --stdout --gauge "$dialog_string" 0 0 0
+
+ # loop that will create each GPT partition, change GUIDS, change names, and set bootable flags.
+ local counter=1
+ local part_number=$(echo $SLX_PARTITION_TABLE | wc -w)
+ local id=0
+ local size=0
+ local mountpoint=""
+ local bootable=0
+ for part in $SLX_PARTITION_TABLE; do
+ IFS=,
+ set $part
+
+ id=$1
+ shift
+ size=${1%G}
+ shift
+ [ -n $1 ] && mountpoint=$1
+ shift
+ case "$*" in
+ *bootable*) bootable=1 ;;
+ *) bootable=0 ;;
+ esac
+
+ #create boot partition and set boot flag
+ if [ "$bootable" -eq 1 ]; then
+ sgdisk /dev/${SLX_CHOOSEN_DISK} -n ${counter}:0:+1M 1>&2 || perror "Error setting size of GPT partition ${SLX_CHOOSEN_DISK}${counter}"
+ sgdisk /dev/${SLX_CHOOSEN_DISK} -t ${counter}:21686148-6449-6E6F-744E-656564454649 1>&2 || perror "Error setting id ${id} of GPT partition ${SLX_CHOOSEN_DISK}${counter}"
+ sgdisk /dev/${SLX_CHOOSEN_DISK} -A ${counter}:set:2 1>&2 || perror "Error setting boot flag for GPT partition ${SLX_CHOOSEN_DISK}${counter}"
+ dialog_string="${dialog_string}Special bootloader partition (/dev/${SLX_CHOOSEN_DISK}${counter})\n"
+ dialog_string="${dialog_string} GUID: 21686148-6449-6E6F-744E-656564454649\n"
+ dialog_string="${dialog_string} Size: 1 MB\n"
+ counter=$(($counter+1))
+ part_number=$(($part_number+1))
+ fi
+
+ #set size of partition
+ sgdisk /dev/${SLX_CHOOSEN_DISK} -n ${counter}:0:+${size}G 1>&2 || perror "Error setting size of GPT partition ${SLX_CHOOSEN_DISK}${counter}"
+
+ #set id of partition
+ if [ "${id}" = "82" ] || [ "${id}" = "83" ]; then
+ sgdisk /dev/${SLX_CHOOSEN_DISK} -t ${counter}:${id}00 1>&2 || perror "Error setting id ${id} of GPT partition ${SLX_CHOOSEN_DISK}${counter}"
+ else
+ sgdisk /dev/${SLX_CHOOSEN_DISK} -t ${counter}:${id}000000-0000-0000-0000-000000000000 -c ${counter}:\"${mountpoint}\" 1>&2 || perror "Error setting id ${id} of GPT partition ${SLX_CHOOSEN_DISK}${counter}"
+ fi
+
+ #update dialog status
+ [ "$id" = "82" ] && mountpoint="swap"
+ dialog_string="${dialog_string}${mountpoint} (/dev/${SLX_CHOOSEN_DISK}${counter})\n"
+ if [ "${id}" = "82" ]; then
+ dialog_string="${dialog_string} GUID: 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F\n"
+ elif [ "${id}" = "83" ]; then
+ dialog_string="${dialog_string} GUID: 0FC63DAF-8483-4772-8E79-3D69D8477DE4\n"
+ else
+ dialog_string="${dialog_string} GUID: ${id}000000-0000-0000-0000-000000000000\n"
+ fi
+ dialog_string="${dialog_string} Size: ${size} GB\n"
+ echo $(echo "(100/$part_number)*$counter" | bc) | dialog --title "Partitioner" --stdout --gauge "${dialog_string}" 0 0 0
+
+ counter=$(($counter+1))
+ done
+ unset IFS
+
+ if [ "$SLX_AUTOMATIC_PARTITIONING" != "yes" ]; then
+ dialog --title "Partitioner" --stdout --msgbox "$dialog_string" 0 0
+ fi
+}
+
+#function to create msdos type partition tables (uses sfdisk)
+partition_disk_msdos(){
+ # delete partition table
+ sgdisk -Z /dev/$SLX_CHOOSEN_DISK > /dev/null 2>&1 || perror "Error erasing old partition table"
+
+ #set dialog
+ dialog_string="Partitions created:\n\n"
+
+ # constructing the sfdisk input file
+ echo "unit: sectors"> /tmp/partitiontable.tmp
+
+ # loop that will create each GPT partition, change GUIDS, change names, and set bootable flags.
+ local counter=1
+ local id=0
+ local size=0
+ local mountpoint=""
+ local bootable=0
+ local part_type="Primary"
+ local start=$(echo "1*1024*1024/$SECTORSIZE" | bc)
+ for part in $SLX_PARTITION_TABLE; do
+ IFS=,
+ set $part
+
+ id=$1
+ shift
+ size=${1%G}
+ shift
+ [ -n $1 ] && mountpoint=$1
+ shift
+ case "$*" in
+ *bootable*) bootable=1 ;;
+ *) bootable=0 ;;
+ esac
+
+ if [ $counter -eq $EXTENDED_PARTITION_NR ]; then
+ echo "/dev/${SLX_CHOOSEN_DISK}$counter : start= $start, size= $(echo "${CHOOSEN_DISK_SIZE}/$SECTORSIZE-1" | bc), Id= 5" >> /tmp/partitiontable.tmp
+ part_type="Logical"
+ start=$(echo "$start+1*1024*1024/$SECTORSIZE" | bc)
+ counter=$(($counter+1))
+ fi
+
+ size_bytes=$(echo "${size}*1024*1024*1024/$SECTORSIZE" | bc)
+
+ if [ "$bootable" -eq 1 ]; then
+ echo "/dev/${SLX_CHOOSEN_DISK}$counter : start= $start, size= $size_bytes, Id= $id, bootable " >> /tmp/partitiontable.tmp
+ else
+ echo "/dev/${SLX_CHOOSEN_DISK}$counter : start= $start, size= $size_bytes, Id= $id" >> /tmp/partitiontable.tmp
+ fi
+
+ start=$(echo "$start+$size_bytes+1*1024*1024/$SECTORSIZE" |bc)
+
+ #update dialog
+ [ "$id" = "82" ] && mountpoint="swap"
+ dialog_string="${dialog_string}$mountpoint (/dev/${SLX_CHOOSEN_DISK}$counter)\n"
+ dialog_string="${dialog_string} Type: $part_type\n"
+ dialog_string="${dialog_string} ID: $id\n"
+ dialog_string="${dialog_string} Size: $size GB\n"
+
+ counter=$(($counter+1))
+ done
+ unset IFS
+
+ sfdisk -q --no-reread -f /dev/${SLX_CHOOSEN_DISK} < /tmp/partitiontable.tmp 1>&2 || return 0
+ # rm -f /tmp/partitiontable.tmp
+
+ if [ "$SLX_AUTOMATIC_PARTITIONING" != "yes" ]; then
+ dialog --title "Partitioner" --stdout --msgbox "$dialog_string" 0 0
+ else
+ dialog --title "Partitioner" --stdout --infobox "$dialog_string" 0 0
+ sleep 5
+ fi
+}
+
+
+define_partition_table
+choose_disk
+select_partition_type
+if [ "$SLX_AUTOMATIC_PARTITIONING" != "yes" ]; then
+ confirm_partitioning
+fi
+check_disk_size
+
+if [ $SLX_PARTITION_TYPE = 'GPT' ]; then
+ partition_disk_gpt
+else
+ partition_disk_msdos
+fi
+
+if [ "$SLX_AUTOMATIC_PARTITIONING" != "yes" ]; then
+ #reboot prompt
+ dialog --title "reboot computer" --stdout --yes-label "Reboot" --no-label "Continue" --yesno "For changes to take effect you have to reboot your machine." 5 65
+ [ $? -eq 0 ] && reboot || exit 0
+else
+ reboot
+fi
+
+####################### CODE FOR THE PRESERVATION OF EXISTING PARTITIONS (EXPERIMENTAL) #########################
+#elif [ $(sfdisk -d /dev/$SLX_CHOOSEN_DISK 2> /dev/null | grep $SLX_CHOOSEN_DISK'1' | tr -s ' ' | cut -d ' ' -f7 | cut -d '=' -f2) = 'ee' ]; then
+## finding existent partitions in GPT
+# echo 'GPT'
+# NONEXISTENT_PARTITIONS=0
+# for (( i = 1; i < $COUNTER; i++ )); do
+# if [ $i -ne 4 ]; then
+# for PART in $PARTS; do
+# if [ "${PARTTBL["$SLX_CHOOSEN_DISK$i/id"]}" = "82" ]; then
+# sgdisk /dev/$SLX_CHOOSEN_DISK -i ${PART:3} 2> /dev/null | grep "0657FD6D-A4AB-43C4-84E5-0933C84B4F4F" > /dev/null
+# elif [ "${PARTTBL["$SLX_CHOOSEN_DISK$i/id"]}" = "83" ]; then
+# sgdisk /dev/$SLX_CHOOSEN_DISK -i ${PART:3} 2> /dev/null | grep "0FC63DAF-8483-4772-8E79-3D69D8477DE4" > /dev/null
+# else
+# sgdisk /dev/$SLX_CHOOSEN_DISK -i ${PART:3} 2> /dev/null | grep ${PARTTBL["$SLX_CHOOSEN_DISK$i/id"]}"000000-0000-0000-0000-000000000000" > /dev/null
+# fi
+# if [ $? -eq 0 ]; then
+# PARTTBL["$SLX_CHOOSEN_DISK$i/exists"]=$PART
+# NEEDED_SPACE=$(($NEEDED_SPACE-${PARTTBL["$SLX_CHOOSEN_DISK$i/size"]}*1024*1024*1024))
+# break
+# fi
+# done
+# if [[ ${PARTTBL["$SLX_CHOOSEN_DISK$i/exists"]} = "0" ]]; then
+# NONEXISTENT_PARTITIONS=$(($NONEXISTENT_PARTITIONS+1))
+# fi
+# fi
+# done
+# # checking if there's sufficient space for the new partitions.
+# if [[ $FREESPACE -lt $NEEDED_SPACE ]]; then
+# dialog --msgbox "ERROR: Insufficient free space in disk /dev/$SLX_CHOOSEN_DISK." 6 40
+# exit 1
+# fi
+# if [[ $NONEXISTENT_PARTITIONS -eq 0 ]]; then
+# dialog_string="All your requested partitions already exists.\n\n"
+# dialog_string=$dialog_string"Partition ID\n"
+# for (( i = 1; i < $COUNTER; i++ )); do
+# if [[ $i -ne 4 ]]; then
+# dialog_string=$dialog_string"${PARTTBL["$SLX_CHOOSEN_DISK$i/exists"]} ${PARTTBL["$SLX_CHOOSEN_DISK$i/id"]}\n"
+# fi
+# done
+# else
+# dialog_string="Creating partitions...\n\n"
+# echo "0" | dialog --gauge "$dialog_string" 0 0 0
+# CREATED=0
+# for (( i = 1; i < $COUNTER; i++ )); do
+# j=1
+# if [[ $i -ne 4 ]]; then
+# if [[ "${PARTTBL["$SLX_CHOOSEN_DISK$i/exists"]}" = "0" ]]; then
+# sgdisk /dev/$SLX_CHOOSEN_DISK -n $j:0:+${PARTTBL["$SLX_CHOOSEN_DISK$i/size"]}G 2> /dev/null > /dev/null
+# while [[ $? -eq 4 ]]; do
+# j=$(($j+1))
+# sgdisk /dev/$SLX_CHOOSEN_DISK -n $j:0:+${PARTTBL["$SLX_CHOOSEN_DISK$i/size"]}G 2> /dev/null > /dev/null
+# done
+# PARTTBL["$SLX_CHOOSEN_DISK$i/exists"]=$SLX_CHOOSEN_DISK$j
+# SIZE=$((${PARTTBL["$SLX_CHOOSEN_DISK$i/size"]}*1024*1024*1024))
+# ID=${PARTTBL["$SLX_CHOOSEN_DISK$i/id"]}
+# MOUNTPOINT=${PARTTBL["$SLX_CHOOSEN_DISK$i/mountpoint"]}
+# dialog_string=$dialog_string$MOUNTPOINT" (/dev/"${PARTTBL["$SLX_CHOOSEN_DISK$i/exists"]}")\n"
+# if [ "${PARTTBL["$SLX_CHOOSEN_DISK$i/id"]}" = "82" ]; then
+# dialog_string=$dialog_string" GUID: 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F\n"
+# elif [ "${PARTTBL["$SLX_CHOOSEN_DISK$i/id"]}" = "83" ]; then
+# dialog_string=$dialog_string" GUID: 0FC63DAF-8483-4772-8E79-3D69D8477DE4\n"
+# else
+# sgdisk /dev/$SLX_CHOOSEN_DISK -t $j:$ID"000000-0000-0000-0000-000000000000" -c $j:$MOUNTPOINT >/dev/null 2>/dev/null
+# dialog_string=$dialog_string" GUID: "$ID"000000-0000-0000-0000-000000000000\n"
+# fi
+# dialog_string=$dialog_string" Size: "$SIZE" Bytes ("${PARTTBL["$SLX_CHOOSEN_DISK$i/size"]}" GB)\n"
+# CREATED=$(($CREATED+1))
+# echo $(( $CREATED*100/($NONEXISTENT_PARTITIONS) )) | dialog --gauge "$dialog_string" 0 0 0
+# fi
+# if [ ${PARTTBL["$SLX_CHOOSEN_DISK$i/bootable"]} -eq 1 ]; then
+# sgdisk /dev/$SLX_CHOOSEN_DISK -A $j:set:2 >/dev/null 2>/dev/null
+# fi
+# fi
+# done
+# fi
+#else
+## finding existent partitions in MS-DOS
+# echo 'MSDOS'
+# for PART in $PARTS; do
+# for (( i = 1; i < $COUNTER; i++ )); do
+# if [ $i -ne 4 ]; then
+# if [ ${PARTTBL["$SLX_CHOOSEN_DISK$i/exists"]} = 0 ]; then
+# sfdisk -d /dev/$SLX_CHOOSEN_DISK 2> /dev/null | grep $PART | tr -s ' ' | cut -d ' ' -f7 | grep ${PARTTBL["$SLX_CHOOSEN_DISK$i/id"]} > /dev/null
+# if [ $? -eq 0 ]; then
+# echo "the partition $PART is the ${PARTTBL["$SLX_CHOOSEN_DISK$i/mountpoint"]} partition."
+# PARTTBL["$SLX_CHOOSEN_DISK$i/exists"]=$PART
+# NEEDED_SPACE=$(($NEEDED_SPACE-${PARTTBL["$SLX_CHOOSEN_DISK$i/size"]}*1024*1024*1024))
+# break
+# fi
+# fi
+# fi
+# done
+# done
+# echo "FREESPACE="$FREESPACE
+# echo "NEEDED_SPACE="$NEEDED_SPACE
+# if [[ $FREESPACE -lt $NEEDED_SPACE ]]; then
+# dialog --msgbox "ERROR: Insufficient free space in disk /dev/$SLX_CHOOSEN_DISK." 6 40
+# exit 1
+# fi
+#fi
diff --git a/server/modules/pvs2mgr-autologin/opt/openslx/xsessions/default.desktop b/server/modules/pvs2mgr-autologin/opt/openslx/xsessions/default.desktop
new file mode 120000
index 00000000..90f83e2b
--- /dev/null
+++ b/server/modules/pvs2mgr-autologin/opt/openslx/xsessions/default.desktop
@@ -0,0 +1 @@
+pvs2mgr.desktop \ No newline at end of file