diff options
| author | Christian Rößler | 2013-09-13 17:03:20 +0200 |
|---|---|---|
| committer | Christian Rößler | 2013-09-13 17:03:20 +0200 |
| commit | 5033cbf74afe9fbd6b697ea036d1b5d11baafda5 (patch) | |
| tree | e58b8687ba2f4733a52d54c4557e649655d38373 | |
| parent | [blacklists] 'includes for gnome (diff) | |
| parent | [setup-partitions] Don't retry if fdisk returns no partitons as boot order ma... (diff) | |
| download | tm-scripts-5033cbf74afe9fbd6b697ea036d1b5d11baafda5.tar.gz tm-scripts-5033cbf74afe9fbd6b697ea036d1b5d11baafda5.tar.xz tm-scripts-5033cbf74afe9fbd6b697ea036d1b5d11baafda5.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
9 files changed, 42 insertions, 20 deletions
diff --git a/remote/modules/debug/debug.conf b/remote/modules/debug/debug.conf index fa2d92a3..82a741fe 100644 --- a/remote/modules/debug/debug.conf +++ b/remote/modules/debug/debug.conf @@ -13,4 +13,6 @@ REQUIRED_BINARIES=" file @htop logger + @tcpdump + getfacl " diff --git a/remote/modules/kdm/data/etc/systemd/system/kdm.service b/remote/modules/kdm/data/etc/systemd/system/kdm.service index 14ff7457..9882459f 100644 --- a/remote/modules/kdm/data/etc/systemd/system/kdm.service +++ b/remote/modules/kdm/data/etc/systemd/system/kdm.service @@ -1,12 +1,9 @@ [Unit] Description=KDM Display Manager Conflicts=getty@tty7.service -After=systemd-user-sessions.service getty@tty7.service plymouth-quit.service +After=systemd-user-sessions.service getty@tty7.service plymouth-quit.service activate-nss-ldap.service [Service] ExecStart=/usr/bin/kdm -nodaemon Restart=always IgnoreSIGPIPE=no - -[Install] -Alias=display-manager.service diff --git a/remote/modules/systemd/data/etc/systemd/system/network.target b/remote/modules/systemd/data/etc/systemd/system/network.target new file mode 100644 index 00000000..0bc2a410 --- /dev/null +++ b/remote/modules/systemd/data/etc/systemd/system/network.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=Network +Documentation=man:systemd.special(7) +Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget +ConditionPathExists=/run/udhcpc/network-ready + diff --git a/remote/modules/systemd/systemd.conf b/remote/modules/systemd/systemd.conf index 3cb6196a..1a038647 100644 --- a/remote/modules/systemd/systemd.conf +++ b/remote/modules/systemd/systemd.conf @@ -4,7 +4,6 @@ REQUIRED_LIBKMOD_VERSION="kmod-14" REQUIRED_LIBKMOD_URL="http://www.kernel.org/pub/linux/utils/kernel/kmod/${REQUIRED_LIBKMOD_VERSION}.tar.gz" REQUIRED_DISABLED_SERVICES=" tmp.mount - time-sync.target systemd-random-seed-save.service systemd-random-seed-load.service systemd-readahead-collect.service @@ -24,7 +23,7 @@ REQUIRED_DISABLED_SERVICES=" nss-user-lookup.target systemd-initctl.service systemd-initctl.socket - swap.target + umount.target " REQUIRED_BINARIES=" journalctl 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 20e789a4..4e663d56 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 @@ -1,8 +1,8 @@ [Unit] Description=Setup local disk partitions (tmp, swap) -After=sysinit.target -Before=shutdown.target DefaultDependencies=no +Before=sysinit.target shutdown.target +Wants=sysinit.target [Service] Type=oneshot diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/setup-slx-addons.service b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/setup-slx-addons.service index acc827c9..6a5b63ad 100644 --- a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/setup-slx-addons.service +++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/setup-slx-addons.service @@ -1,9 +1,10 @@ [Unit] Description=Download, mount and append SLX addons -After=sysinit.target setup-partitions.service -Wants=setup-partitions.service +After=setup-partitions.service +DefaultDependencies=no [Service] Type=oneshot ExecStart=/opt/openslx/scripts/systemd-setup_slx_addons RemainAfterExit=yes + diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/update-etc_issue.service b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/update-etc_issue.service index c4f45a3c..21a09b7c 100644 --- a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/update-etc_issue.service +++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/update-etc_issue.service @@ -1,6 +1,6 @@ [Unit] Description=Update /etc/issue -Before=sysinit.target shutdown.target +Before=getty.target shutdown.target DefaultDependencies=no [Service] diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_network_time b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_network_time index 3e644abd..87c93fd4 100755 --- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_network_time +++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_network_time @@ -3,13 +3,13 @@ . /opt/openslx/config || { echo "Could not source config!"; exit 1; } SLX_NTP_SERVER="$SLX_NTP_SERVER 0.de.pool.ntp.org" for SERVER in $SLX_NTP_SERVER; do - if ntpdate -u -b "$SERVER"; then + if ntpdate -u -p 2 "$SERVER"; then echo "Successfully queried $SERVER for time." if [ "x$SLX_BIOS_CLOCK" = "xlocal" ]; then - sleep 1 + usleep 100000 hwclock -l -w || echo "... but could not set BIOS clock to localtime" elif [ "x$SLX_BIOS_CLOCK" = "xutc" ]; then - sleep 1 + usleep 100000 hwclock -u -w || echo "... but could not set BIOS clock to UTC" fi exit 0 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 bc5ce9c1..b0f606dd 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 @@ -52,6 +52,21 @@ diskfm () { } function 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" +} + +function mount_temp_fallback () { mkdir -p /tmptmp mv /tmp/* /tmp/.* /tmptmp/ 2> /dev/null mount $@ /tmp || return 1 @@ -61,12 +76,7 @@ function mount_temp () { return 0 } -# Check for local harddisks and appropriate partitions -for waiting in 1 1 2 3 4; do - fdisk -l | sed -n "/^\/dev\//p" > "/etc/disk.partition" - [ -s "/etc/disk.partition" ] && break - sleep "$waiting" -done +fdisk -l | sed -n "/^\/dev\//p" > "/etc/disk.partition" echo "Partitions:" cat "/etc/disk.partition" |
