From 9de0a9ea4e1ed9dce9c9c5e1afa0af6eecb7c10c Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Sat, 6 Apr 2013 16:57:26 +0200 Subject: only automount nfs when DEBUG != 0 --- .../modules/systemd/data/etc/systemd/system/nfs-mount.service | 2 +- remote/rootfs/rootfs-stage32/data/etc/udhcpc.openslx.script | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/remote/modules/systemd/data/etc/systemd/system/nfs-mount.service b/remote/modules/systemd/data/etc/systemd/system/nfs-mount.service index 727ff2ed..408bc053 100644 --- a/remote/modules/systemd/data/etc/systemd/system/nfs-mount.service +++ b/remote/modules/systemd/data/etc/systemd/system/nfs-mount.service @@ -4,4 +4,4 @@ Description=Mount NFS Share [TEST] [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/bin/mount -t nfs -o ro,async,nolock 132.230.4.6:/srv/openslx/export/nfs/ubuntu-12.04-test /openslx/mnt +ExecStart=/usr/sbin/mountexport diff --git a/remote/rootfs/rootfs-stage32/data/etc/udhcpc.openslx.script b/remote/rootfs/rootfs-stage32/data/etc/udhcpc.openslx.script index bff430ef..be25c9c0 100755 --- a/remote/rootfs/rootfs-stage32/data/etc/udhcpc.openslx.script +++ b/remote/rootfs/rootfs-stage32/data/etc/udhcpc.openslx.script @@ -22,6 +22,8 @@ IP_CONF="/tmp/udhcpc_ip_config" export PATH=$PATH:/openslx/sbin:/openslx/bin +set >> /root/udhcpc_args + case $1 in bound|renew) @@ -38,8 +40,13 @@ case $1 in # Update resolver configuration file R="" - [ -n "$domain" ] && R="domain $domain + if [ -n "$domain" ]; then + R="domain $domain +" + else + R="domain lp.ruf.uni-freiburg.de " + count=1; for i in $dns; do echo "$0: Adding DNS $i" @@ -55,7 +62,7 @@ case $1 in fi # TODO i.e. event trigger - systemctl start nfs-mount.service + [ $DEBUG -gt 0 ] && systemctl start nfs-mount.service ;; -- cgit v1.2.3-55-g7522