diff options
Diffstat (limited to 'core/modules')
45 files changed, 208 insertions, 46 deletions
diff --git a/core/modules/alsa/data/opt/openslx/scripts/alsa-default_card b/core/modules/alsa/data/opt/openslx/scripts/alsa-default_card index 4e372f9c..976c5543 100755 --- a/core/modules/alsa/data/opt/openslx/scripts/alsa-default_card +++ b/core/modules/alsa/data/opt/openslx/scripts/alsa-default_card @@ -2,7 +2,12 @@ PROC="/proc/asound/pcm" -if [ ! -r "$PROC" ]; then +i=0 +while (( ++i < 10 )); do + [ -r "$PROC" ] && break + sleep 1 +done +if ! [ -r "$PROC" ]; then echo "'${PROC}' not found or not readable. Not setting default sound card." exit 0 fi diff --git a/core/modules/alsa/data/opt/openslx/vmchooser/sessionstart.d/default-sound-volume b/core/modules/alsa/data/opt/openslx/vmchooser/sessionstart.d/default-sound-volume new file mode 100755 index 00000000..2eaa7060 --- /dev/null +++ b/core/modules/alsa/data/opt/openslx/vmchooser/sessionstart.d/default-sound-volume @@ -0,0 +1,15 @@ +#!/bin/ash +# +# This hook evaluates the SLX_VM_SOUND configuration option +# and mutes the sound via ALSA if appropriate. This will only +# take effect in non-virtual sessions (determined by the +# env variable SESSION_TYPE given by vmchooser). + +if [ "$SESSION_TYPE" = "XSESSION" ]; then + . /opt/openslx/config + + if [ "$SLX_VM_SOUND" = "DEFAULT_MUTED" -o "$SLX_VM_SOUND" = "FORCE_MUTED" ]; then + amixer set Master mute + fi +fi +: # fake success to not trigger slxlog diff --git a/core/modules/busybox/module.build b/core/modules/busybox/module.build index 9b83e1e7..ae009259 100644 --- a/core/modules/busybox/module.build +++ b/core/modules/busybox/module.build @@ -34,8 +34,14 @@ build() { pinfo "Running make (if this hangs, check for unset options, ie. when you increased the REQUIRED_BRANCH)" make || perror "failed." pinfo "Running make install" - make CONFIG_PREFIX="$MODULE_BUILD_DIR" install || perror "failed" - rm -f "$MODULE_BUILD_DIR/bin/mount" "$MODULE_BUILD_DIR/bin/umount" "$MODULE_BUILD_DIR/bin/bash" + local INSTALL_PREFIX + if [ -n "$REMOTE_LOCAL_INSTALL" ]; then + INSTALL_PREFIX="${MODULE_BUILD_DIR}/opt/openslx" + else + INSTALL_PREFIX="${MODULE_BUILD_DIR}" + fi + make CONFIG_PREFIX="${INSTALL_PREFIX}" install || perror "failed" + rm -f "${INSTALL_PREFIX}/bin/mount" "${INSTALL_PREFIX}/bin/umount" "${INSTALL_PREFIX}/bin/bash" } post_copy() { diff --git a/core/modules/busybox/module.conf b/core/modules/busybox/module.conf index 265f53f3..6f29188b 100644 --- a/core/modules/busybox/module.conf +++ b/core/modules/busybox/module.conf @@ -3,6 +3,5 @@ REQUIRED_GIT="git://git.busybox.net/busybox" REQUIRED_BRANCH="1_31_1" REQUIRED_BINARIES="busybox" REQUIRED_DIRECTORIES=" - /bin - /sbin + / " diff --git a/core/modules/cron/module.conf b/core/modules/cron/module.conf index 31573eb0..33dcdcc3 100644 --- a/core/modules/cron/module.conf +++ b/core/modules/cron/module.conf @@ -1,4 +1,7 @@ #!/bin/bash +REQUIRED_MODULES=" + slx-log +" REQUIRED_GIT="https://github.com/cronie-crond/cronie.git" REQUIRED_COMMIT="d582556168e740fbd19e777a6733b404084e69d8" REQUIRED_BINARIES=" diff --git a/core/modules/distro-logo/module.build b/core/modules/distro-logo/module.build index 4e30667f..8c2813c8 100644 --- a/core/modules/distro-logo/module.build +++ b/core/modules/distro-logo/module.build @@ -13,6 +13,7 @@ post_copy() { local DIST=$(lsb_release -si) if [ -n "$DIST" ]; then [ -z "$CFG_DISTLOGO_URL" ] && CFG_DISTLOGO_URL='http://mltk-services.ruf.uni-freiburg.de/distro_logo.php?distro=' + mkdir -p "$TARGET_BUILD_DIR/etc" wget -t 3 -T 3 -O "$TARGET_BUILD_DIR/etc/distro.png" "${CFG_DISTLOGO_URL}${DIST}" if [ ! -s "$TARGET_BUILD_DIR/etc/distro.png" ]; then rm -f "$TARGET_BUILD_DIR/etc/distro.png" diff --git a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy index e45272a6..e44fc15a 100755 --- a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy +++ b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy @@ -283,6 +283,24 @@ if [ -n "$islocal" ]; then adduser dnbd3 fuse # Start service, is not symlinked when not in proxy mode systemctl --no-block start dnbd3-proxy.service + if [ -d /dev/dnbd0 ] && [ "$( cat /sys/block/dnbd0/net/rid )" -gt 0 ]; then + # give it some time to start + usleep 500000 + # add the server + if ! dnbd3-client -A "127.0.0.1:$DNBD3_PORT" -d /dev/dnbd0; then + echo "Cannot add localhost to dnbd0" >&2 + else + for i in 1 2 3 4 5 ""; do + echo | busybox timeout 1 busybox nc 127.0.0.1 "$DNBD3_PORT" && break + echo "port wait fail #$i" + [ -z "$i" ] && break + sleep 1 + done + if ! dnbd3-client -s "127.0.0.1:$DNBD3_PORT" -d /dev/dnbd0; then + echo "Cannot switch dnbd0 to localhost" >&2 + fi + fi + fi fi exit 0 diff --git a/core/modules/dnbd3-proxy-mode/module.build b/core/modules/dnbd3-proxy-mode/module.build index a2c0bd22..4ab661f9 100644 --- a/core/modules/dnbd3-proxy-mode/module.build +++ b/core/modules/dnbd3-proxy-mode/module.build @@ -8,6 +8,6 @@ build() { } post_copy() { - add_group "dnbd3" - USER="dnbd3" GROUP="dnbd3" add_user + add_system_group "dnbd3" + USER="dnbd3" GROUP="dnbd3" add_system_user } diff --git a/core/modules/dnbd3/module.build b/core/modules/dnbd3/module.build index 671bf120..1c877c8f 100644 --- a/core/modules/dnbd3/module.build +++ b/core/modules/dnbd3/module.build @@ -38,5 +38,5 @@ build() { } post_copy() { - : + add_system_group "fuse" } diff --git a/core/modules/idleaction/module.conf b/core/modules/idleaction/module.conf index 24d0a301..503a35a7 100644 --- a/core/modules/idleaction/module.conf +++ b/core/modules/idleaction/module.conf @@ -1,4 +1,7 @@ #!/bin/bash +REQUIRED_MODULES=" + slxlog +" REQUIRED_BINARIES=" idle-daemon xprintidle diff --git a/core/modules/iptables-helper/module.conf b/core/modules/iptables-helper/module.conf index 46eb4e93..2c41c13c 100644 --- a/core/modules/iptables-helper/module.conf +++ b/core/modules/iptables-helper/module.conf @@ -1,4 +1,5 @@ #!/bin/bash REQUIRED_MODULES=" + slxlog iptables " diff --git a/core/modules/kdm-theme-bwlp/module.build b/core/modules/kdm-theme-bwlp/module.build index 135bddfc..eb6f479b 100644 --- a/core/modules/kdm-theme-bwlp/module.build +++ b/core/modules/kdm-theme-bwlp/module.build @@ -8,7 +8,7 @@ build () { : } -post_copy() { +post_copy () { : } diff --git a/core/modules/kdm-theme-bwlp/module.conf b/core/modules/kdm-theme-bwlp/module.conf index b3907425..3bfd1cf4 100644 --- a/core/modules/kdm-theme-bwlp/module.conf +++ b/core/modules/kdm-theme-bwlp/module.conf @@ -1,3 +1,6 @@ #!/bin/bash -REQUIRED_MODULES="kdm" +REQUIRED_MODULES=" + distro-logo + kdm +" diff --git a/core/modules/kernel-vanilla/module.build b/core/modules/kernel-vanilla/module.build index a6a33f48..9e7b1ed3 100644 --- a/core/modules/kernel-vanilla/module.build +++ b/core/modules/kernel-vanilla/module.build @@ -34,13 +34,15 @@ fetch_source() { rm -rf "./ksrc" git clone --depth 1 "${REQUIRED_GIT}" -b "v${REQUIRED_KERNEL}" ksrc || perror "Could not clone kernel git." fi - # check for aufs - local RSL=$(find ksrc/ -type d -name aufs) - if [ -z "$RSL" ]; then - pinfo "aufs not found in kernel sources, patching it..." - patch_aufs - else - pinfo "aufs detected in kernel source :)" + if [ -z "$REMOTE_LOCAL_INSTALL" ]; then + # check for aufs + local RSL="$( find ksrc/ -type d -name aufs )" + if [ -z "$RSL" ]; then + pinfo "aufs not found in kernel sources, patching it..." + patch_aufs + else + pinfo "aufs detected in kernel source :)" + fi fi # Other patches local patch diff --git a/core/modules/kexec-reboot/data/etc/systemd/system/basic.target.wants/enable-kexec-reboot.service b/core/modules/kexec-reboot/data/etc/systemd/system/basic.target.wants/enable-kexec-reboot.service deleted file mode 120000 index 510ad25a..00000000 --- a/core/modules/kexec-reboot/data/etc/systemd/system/basic.target.wants/enable-kexec-reboot.service +++ /dev/null @@ -1 +0,0 @@ -../enable-kexec-reboot.service
\ No newline at end of file diff --git a/core/modules/kexec-reboot/data/etc/systemd/system/ctrl-alt-del.target b/core/modules/kexec-reboot/data/etc/systemd/system/ctrl-alt-del.target new file mode 120000 index 00000000..b202bdcb --- /dev/null +++ b/core/modules/kexec-reboot/data/etc/systemd/system/ctrl-alt-del.target @@ -0,0 +1 @@ +/lib/systemd/system/kexec.target
\ No newline at end of file diff --git a/core/modules/kexec-reboot/data/etc/systemd/system/enable-kexec-reboot.service b/core/modules/kexec-reboot/data/etc/systemd/system/enable-kexec-reboot.service deleted file mode 100644 index 9b0bf175..00000000 --- a/core/modules/kexec-reboot/data/etc/systemd/system/enable-kexec-reboot.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Enable kexec-reboot via ctrl-alt-del -DefaultDependencies=no - -[Service] -Type=oneshot -ExecStart=/bin/sh -c "rm -f /etc/systemd/system/ctrl-alt-del.target; systemctl enable kexec.target; exit 0" diff --git a/core/modules/kexec-reboot/data/opt/openslx/scripts/systemd-kexec_load b/core/modules/kexec-reboot/data/opt/openslx/scripts/systemd-kexec_load index c7dae7bc..27be324a 100755 --- a/core/modules/kexec-reboot/data/opt/openslx/scripts/systemd-kexec_load +++ b/core/modules/kexec-reboot/data/opt/openslx/scripts/systemd-kexec_load @@ -53,15 +53,15 @@ kexec_load() { if ! dl_long "${base}/boot/ipxe?type=bash&entryid=$ipxeId&uuid=$(cat /etc/system-uuid)" > "${tempdir}/bootentry"; then echo "Could not download iPXE menu entry, falling back..." else - local ip="$( ip addr show dev br0 | awk '{ if ($1 == "inet") { print $2; exit 0 }}' )" - local gateway="$( ip route show dev br0 | awk '{ if ($1 == "default") {print $3; exit 0 }}' )" + local ip="$( ip addr show dev $SLX_PXE_NETIF | awk '{ if ($1 == "inet") { print $2; exit 0 }}' )" + local gateway="$( ip route show dev $SLX_PXE_NETIF | awk '{ if ($1 == "default") {print $3; exit 0 }}' )" local dns="${SLX_DNS// /,}" local hostname="${SLX_HOSTNAME}" local domain="${SLX_NET_DOMAIN}" local dnssl="${SLX_NET_SEARCH// /,}" local mac="${SLX_PXE_MAC}" local ntpsrv="${SLX_NTP_SERVER// /,}" - [ -z "$mac" ] && mac="$( ip addr show dev br0 | awk '{ if ($1 == "link/ether") { print $2; exit 0 }}' )" + [ -z "$mac" ] && mac="$( ip addr show dev $SLX_PXE_NETIF | awk '{ if ($1 == "link/ether") { print $2; exit 0 }}' )" . "${tempdir}/bootentry" if [ -z "$kernel" ]; then echo "iPXE boot entry is missing kernel, falling back..." diff --git a/core/modules/kiosk-chromium/module.conf.ubuntu b/core/modules/kiosk-chromium/module.conf.ubuntu index f5d87627..7cb1575c 100644 --- a/core/modules/kiosk-chromium/module.conf.ubuntu +++ b/core/modules/kiosk-chromium/module.conf.ubuntu @@ -1,10 +1,13 @@ #!/bin/bash REQUIRED_CONTENT_PACKAGES=" + chromium-browser + chromium-browser-l10n + fonts-noto-color-emoji jq xbindkeys libnss3-tools " -REQUIRED_INSTALLED_PACKAGES="$REQUIRED_CONTENT_PACKAGES" +REQUIRED_INSTALLED_PACKAGES="" REQUIRED_BINARIES="" REQUIRED_LIBRARIES="" REQUIRED_DIRECTORIES="" diff --git a/core/modules/lightdm/data/etc/X11/default-display-manager b/core/modules/lightdm/data/etc/X11/default-display-manager new file mode 100644 index 00000000..7d4e29bb --- /dev/null +++ b/core/modules/lightdm/data/etc/X11/default-display-manager @@ -0,0 +1 @@ +/usr/sbin/lightdm diff --git a/core/modules/lightdm/module.build b/core/modules/lightdm/module.build index 656d71a9..340f6444 100644 --- a/core/modules/lightdm/module.build +++ b/core/modules/lightdm/module.build @@ -12,9 +12,10 @@ build() { post_copy() { mkdir -p "${TARGET_BUILD_DIR}/var/lib/lightdm"{,-data} - local LDMUID=$(add_user "lightdm") - local LDMGID=$(add_group "lightdm") + local LDMUID=$(add_system_user "lightdm") + local LDMGID=$(add_system_group "lightdm") pinfo "lightdm user and group is $LDMUID $LDMGID" - chown -R "${LDMUID}:${LDMGID}" "${TARGET_BUILD_DIR}/var/lib/lightdm/" || perror "chowning '${TARGET_BUILD_DIR}/var/lib/lightdm/' failed." + chown -R "${LDMUID}:${LDMGID}" "${TARGET_BUILD_DIR}/var/lib/lightdm/" \ + || perror "chowning '${TARGET_BUILD_DIR}/var/lib/lightdm/' failed." } diff --git a/core/modules/network-online-slx-targets/data/etc/systemd/system/network-online.target.d/00-slx-targets.conf b/core/modules/network-online-slx-targets/data/etc/systemd/system/network-online.target.d/00-slx-targets.conf index 898d20b1..81208043 100644 --- a/core/modules/network-online-slx-targets/data/etc/systemd/system/network-online.target.d/00-slx-targets.conf +++ b/core/modules/network-online-slx-targets/data/etc/systemd/system/network-online.target.d/00-slx-targets.conf @@ -1,3 +1,4 @@ [Unit] -Wants=network-gateway.target network-dns.target +Wants=network-gateway.target network-dns.target network.target Before=network-gateway.target network-dns.target +After=network.target diff --git a/core/modules/nvidia-libs/module.build b/core/modules/nvidia-libs/module.build index b35e6fd2..d2a5ee63 100644 --- a/core/modules/nvidia-libs/module.build +++ b/core/modules/nvidia-libs/module.build @@ -9,3 +9,11 @@ module_load() { MODULE_BUILD_DIR="$SRC" } +post_copy() { + # generate addon-required for this version + cat <<-EOF > "${TARGET_BUILD_DIR}/addon-required" + #!/bin/ash + [ "\$( cat /sys/module/nvidia/version )" = "$VERSION" ] + EOF + chmod +x "${TARGET_BUILD_DIR}/addon-required" +} diff --git a/core/modules/pam-bwidm/module.conf b/core/modules/pam-bwidm/module.conf index 237dd69c..c8a55dfb 100644 --- a/core/modules/pam-bwidm/module.conf +++ b/core/modules/pam-bwidm/module.conf @@ -1,3 +1,6 @@ #!/bin/bash +REQUIRED_MODULES=" + slxlog +" REQUIRED_BINARIES=" " diff --git a/core/modules/pam-common-share/module.conf b/core/modules/pam-common-share/module.conf index 8811668a..f20668f6 100644 --- a/core/modules/pam-common-share/module.conf +++ b/core/modules/pam-common-share/module.conf @@ -1,4 +1,7 @@ #!/bin/bash +REQUIRED_MODULES=" + slxlog +" REQUIRED_BINARIES="" REQUIRED_LIBRARIES="" REQUIRED_DIRECTORIES="" diff --git a/core/modules/pam/data/etc/profile.d/00-user-env.sh b/core/modules/pam/data/etc/profile.d/00-user-env.sh new file mode 100644 index 00000000..a2d10989 --- /dev/null +++ b/core/modules/pam/data/etc/profile.d/00-user-env.sh @@ -0,0 +1,14 @@ +#!/bin/ash + +# Stuff we might wanna know +PWENT= +[ -n "$UID" ] && PWENT=`getent passwd "$UID"` +[ -z "$PWENT" ] && [ -n "$PAM_USER" ] && PWENT=`getent passwd "$PAM_USER"` +if [ -n "$PWENT" ]; then + export USER=`echo "$PWENT" | awk -F ':' '{print $1}'` + export GID=`echo "$PWENT" | awk -F ':' '{print $4}'` + export HOME=`echo "$PWENT" | awk -F ':' '{print $6}'` + export GROUP=`id -gn` + export LOGNAME=$USER + export HOSTNAME=`hostname` +fi diff --git a/core/modules/pam/module.conf b/core/modules/pam/module.conf index 86b91b8d..7789139d 100644 --- a/core/modules/pam/module.conf +++ b/core/modules/pam/module.conf @@ -1,4 +1,7 @@ #!/bin/bash +REQUIRED_MODULES=" + slxlog +" REQUIRED_BINARIES=" ldapsearch rpc.gssd diff --git a/core/modules/polkit/module.build b/core/modules/polkit/module.build index b956f23c..b1e61f66 100644 --- a/core/modules/polkit/module.build +++ b/core/modules/polkit/module.build @@ -17,6 +17,6 @@ build () { post_copy() { #Add Polkit User/Group/Shadow to Stage3.2, required on opensuse pinfo "Adding polkitd user to target system..." - add_user "polkitd" + add_system_user "polkitd" } diff --git a/core/modules/printergui/data/opt/openslx/scripts/systemd-printergui_preparation b/core/modules/printergui/data/opt/openslx/scripts/systemd-printergui_preparation index 29971666..d130f470 100755 --- a/core/modules/printergui/data/opt/openslx/scripts/systemd-printergui_preparation +++ b/core/modules/printergui/data/opt/openslx/scripts/systemd-printergui_preparation @@ -13,7 +13,7 @@ mv -n "$SRCDIR"/* "$DESTDIR" cd "$SRCDIR" for i in "$DESTDIR"/*; do - ln -s "$PRINTPWGUI" $(basename "$i") + ln -sf "$PRINTPWGUI" $(basename "$i") done exit 0 diff --git a/core/modules/printergui/module.conf b/core/modules/printergui/module.conf index 2746168f..3875944b 100644 --- a/core/modules/printergui/module.conf +++ b/core/modules/printergui/module.conf @@ -1,4 +1,7 @@ #!/bin/bash +REQUIRED_MODULES=" + slxlog +" REQUIRED_GIT="git://git.openslx.org/openslx-ng/printergui.git" REQUIRED_COMMIT="HEAD" REQUIRED_BINARIES=" diff --git a/core/modules/redsocks/module.build b/core/modules/redsocks/module.build index 9dacd88b..b1298c9d 100644 --- a/core/modules/redsocks/module.build +++ b/core/modules/redsocks/module.build @@ -20,6 +20,6 @@ build () { } post_copy() { - add_user redsocks + add_system_user redsocks } diff --git a/core/modules/run-virt/data/etc/systemd/system/run-virt-env.service b/core/modules/run-virt/data/etc/systemd/system/run-virt-env.service index 88b76789..2c602076 100644 --- a/core/modules/run-virt/data/etc/systemd/system/run-virt-env.service +++ b/core/modules/run-virt/data/etc/systemd/system/run-virt-env.service @@ -1,8 +1,9 @@ [Unit] Description=Sets up the virtualization environment Before=graphical.target system-check.service -Wants=network-dns.target system-check.service -After=network-dns.target +After=systemd-tmpfiles-setup.service bridge-additional-nics.service +Wants=systemd-tmpfiles-setup.service system-check.service bridge-additional-nics.service +DefaultDependencies=no [Service] Type=oneshot diff --git a/core/modules/run-virt/data/etc/tmpfiles.d/openslx-log.conf b/core/modules/run-virt/data/etc/tmpfiles.d/openslx-log.conf new file mode 100644 index 00000000..4d93fb9c --- /dev/null +++ b/core/modules/run-virt/data/etc/tmpfiles.d/openslx-log.conf @@ -0,0 +1 @@ +d /var/log/openslx 0777 root root diff --git a/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env b/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env index 6b79d0ec..526f69a6 100755 --- a/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env +++ b/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env @@ -195,6 +195,12 @@ getips () { } # read the DNS configuration and configure the udhcpd +getresolvconf() { + awk -vattr="$1" '$1 == attr {for (i=2; i<=NF; i++) printf "%s ",$i}' /etc/resolv.conf +} +[ -z "${SLX_DNS}" ] && SLX_DNS="$( getresolvconf nameserver )" +[ -z "${SLX_NET_DOMAIN}" ] && SLX_NET_DOMAIN="$( getresolvconf domain )" +[ -z "${SLX_NET_SEARCH}" ] && SLX_NET_SEARCH="$( getresolvconf search )" [ -z "${SLX_DNS}" ] && SLX_DNS="8.8.8.8 8.8.4.4" [ -z "${SLX_NET_DOMAIN}" ] && SLX_NET_DOMAIN="$FALLBACK_DOMAIN" [ -z "${SLX_NET_SEARCH}" ] && SLX_NET_SEARCH="$FALLBACK_DOMAIN" diff --git a/core/modules/safe-mode/data/etc/systemd/system/exam.service b/core/modules/safe-mode/data/etc/systemd/system/exam.service index 14473a6f..646c8b36 100644 --- a/core/modules/safe-mode/data/etc/systemd/system/exam.service +++ b/core/modules/safe-mode/data/etc/systemd/system/exam.service @@ -1,7 +1,8 @@ [Unit] Description=Sets up safe mode (no magic keys, no tty switch, no openbox menu) DefaultDependencies=no -Before=graphical.target display-manager.target +Before=basic.target systemd-logind.service +After=systemd-sysctl.service [Service] Type=oneshot diff --git a/core/modules/slx-issue/data/etc/systemd/system/update-etc_issue.service b/core/modules/slx-issue/data/etc/systemd/system/update-etc_issue.service index bdfab085..1f040d6d 100644 --- a/core/modules/slx-issue/data/etc/systemd/system/update-etc_issue.service +++ b/core/modules/slx-issue/data/etc/systemd/system/update-etc_issue.service @@ -1,7 +1,7 @@ [Unit] Description=Update /etc/issue After=setup-partitions.service -Before=getty.target shutdown.target +Before=getty-pre.target getty.target shutdown.target DefaultDependencies=no [Service] diff --git a/core/modules/sshd/data/etc/systemd/system/sshd.service b/core/modules/sshd/data/etc/systemd/system/sshd.service index fc711808..999187cd 100644 --- a/core/modules/sshd/data/etc/systemd/system/sshd.service +++ b/core/modules/sshd/data/etc/systemd/system/sshd.service @@ -1,5 +1,7 @@ [Unit] Description=OpenSSH Daemon +Requires=systemd-tmpfiles-setup.service +After=systemd-tmpfiles-setup.service [Service] ExecStart=/usr/sbin/sshd -D diff --git a/core/modules/systemd/module.build b/core/modules/systemd/module.build index 2e11bcd7..3cca1928 100644 --- a/core/modules/systemd/module.build +++ b/core/modules/systemd/module.build @@ -96,7 +96,7 @@ build () { } post_copy() { - add_user "kvm" - add_user "systemd-journal-upload" + add_system_user "kvm" + add_system_user "systemd-journal-upload" } diff --git a/core/modules/vmchooser2/data/etc/lightdm/lightdm.conf.d/00-slx-xsessions.conf b/core/modules/vmchooser2/data/etc/lightdm/lightdm.conf.d/00-slx-xsessions.conf new file mode 100644 index 00000000..7ba5cd56 --- /dev/null +++ b/core/modules/vmchooser2/data/etc/lightdm/lightdm.conf.d/00-slx-xsessions.conf @@ -0,0 +1,2 @@ +[LightDM] +sessions-directory=/opt/openslx/xsessions diff --git a/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version b/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version index 887e995b..7d1190c5 100755 --- a/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version +++ b/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version @@ -2,6 +2,9 @@ # This script checks whether given VMware version supports the CPU: # * Intel: check for "VMX Unrestricted Guest" CPU flag # * AMD: check if CPU family is Bulldozer or newer +# +# It can be called inside a dracut context and tries to do +# chroot magic to call/load the required tools. VIRTTYPE="$( grep -m1 '^flags\s*:' /proc/cpuinfo | grep -woF -e svm -e vmx )" diff --git a/core/modules/vmware12/data/addon-required b/core/modules/vmware12/data/addon-required new file mode 100644 index 00000000..6261292c --- /dev/null +++ b/core/modules/vmware12/data/addon-required @@ -0,0 +1,19 @@ +#!/bin/bash + +# the vmware helper needs the kmod msr and the tool rdmsr, +# /dev, /sys and /proc to properly detect the CPU info. + +bindmount=("/dev" "/proc" "/sys") + +for bm in "${bindmount[@]}"; do + mount --bind "$bm" "${NEWROOT}/${bm}" +done + +export PATH="$PATH:/opt/openslx/sbin:/opt/openslx/bin" +version="$(chroot "$NEWROOT" vmware-get-supported-version)" + +for bm in "${bindmount[@]}"; do + umount "${NEWROOT}/${bm}" +done + +[ -n "$version" ] && [ "$version" = "legacy" ] diff --git a/core/modules/vmware12/data/opt/openslx/bin/vmplayer b/core/modules/vmware12/data/opt/openslx/bin/vmplayer index f94c8794..afac3c94 100755 --- a/core/modules/vmware12/data/opt/openslx/bin/vmplayer +++ b/core/modules/vmware12/data/opt/openslx/bin/vmplayer @@ -9,7 +9,10 @@ PROG=$(basename $0) # various hacks to help vmplayer find its own libs -.- export VMWARE_USE_SHIPPED_LIBS=force -export LD_LIBRARY_PATH=$( find /usr/lib/vmware/lib/ -maxdepth 1 -mindepth 1 -type d | awk 'BEGIN{p=""}{p=p$0":"}END{print p}' ) +export LD_LIBRARY_PATH=$( \ + find /usr/lib/vmware/lib/ -maxdepth 1 -mindepth 1 -type d \ + | grep -v libfontconfig \ + | awk 'BEGIN{p=""}{p=p$0":"}END{print p}' ) exec "$PREFIX/lib/wrapper-gtk24.sh" \ "$PREFIX/lib" \ diff --git a/core/modules/vmware15/data/addon-required b/core/modules/vmware15/data/addon-required new file mode 100644 index 00000000..a86e41bc --- /dev/null +++ b/core/modules/vmware15/data/addon-required @@ -0,0 +1,19 @@ +#!/bin/bash + +# the vmware helper needs the kmod msr and the tool rdmsr, +# /dev, /sys and /proc to properly detect the CPU info. + +bindmount=("/dev" "/proc" "/sys") + +for bm in "${bindmount[@]}"; do + mount --bind "$bm" "${NEWROOT}/${bm}" +done + +export PATH="$PATH:/opt/openslx/sbin:/opt/openslx/bin" +version="$(chroot "$NEWROOT" vmware-get-supported-version)" + +for bm in "${bindmount[@]}"; do + umount "${NEWROOT}/${bm}" +done + +[ -n "$version" ] && [ "$version" = "new" ] diff --git a/core/modules/vmware15/module.build b/core/modules/vmware15/module.build index c85754ad..f5e96f9c 100644 --- a/core/modules/vmware15/module.build +++ b/core/modules/vmware15/module.build @@ -185,9 +185,6 @@ post_copy() { "$guid" "${TARGET_BUILD_DIR}/usr/share/icons/hicolor/" done - # fix vmware-usbarbitrator bug - date +'%Y.%m.%d' >"${TARGET_BUILD_DIR}/etc/arch-release" - mkdir -p "$TARGET_BUILD_DIR/lib/modules/vmware/" cp "${MODULE_BUILD_DIR}/lib/modules/$TARGET_KERNEL_LONG/vmplayer/"* "$TARGET_BUILD_DIR/lib/modules/vmware/" || perror "Could not cp vmware modules to target!" diff --git a/core/modules/vmware16/data/addon-required b/core/modules/vmware16/data/addon-required new file mode 100644 index 00000000..a86e41bc --- /dev/null +++ b/core/modules/vmware16/data/addon-required @@ -0,0 +1,19 @@ +#!/bin/bash + +# the vmware helper needs the kmod msr and the tool rdmsr, +# /dev, /sys and /proc to properly detect the CPU info. + +bindmount=("/dev" "/proc" "/sys") + +for bm in "${bindmount[@]}"; do + mount --bind "$bm" "${NEWROOT}/${bm}" +done + +export PATH="$PATH:/opt/openslx/sbin:/opt/openslx/bin" +version="$(chroot "$NEWROOT" vmware-get-supported-version)" + +for bm in "${bindmount[@]}"; do + umount "${NEWROOT}/${bm}" +done + +[ -n "$version" ] && [ "$version" = "new" ] |