summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-10-05 11:31:19 +0100
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-10-05 11:31:19 +0100
commit4aaae019923e9f583c5c069750005b3e95be6ebe (patch)
tree25661e2e010fb3aade827da8573201c001a2d032
parent17067a594df8683e533ec2e4cde8c66db5796a77 (diff)
downloaddefinitions-baserock/pedroalvarez/no-chroot-in-config-exts.tar.gz
Remove chroot calls in configuration extensions.baserock/pedroalvarez/no-chroot-in-config-exts
This is not a good practice. Deployment of systems of a given architecture can be done from a system running in a different architecture. That's why `chroot` can't be used in configuration extensions.
-rwxr-xr-xnfsboot-server.configure6
1 files changed, 4 insertions, 2 deletions
diff --git a/nfsboot-server.configure b/nfsboot-server.configure
index 9779c053..49bea520 100755
--- a/nfsboot-server.configure
+++ b/nfsboot-server.configure
@@ -24,7 +24,8 @@ ROOT="$1"
##########################################################################
-chroot "$ROOT" systemctl enable nfs-server.service
+ln -sf /lib/systemd/system/nfs-server.service \
+ "$ROOT/etc/systemd/system/multi-user.target.wants/nfs-server.service"
mkdir -p "$ROOT/srv/nfsboot/tftp" "$ROOT/srv/nfsboot/nfs"
@@ -41,4 +42,5 @@ ExecStart=/usr/bin/udpsvd -E 0 69 /usr/sbin/tftpd /srv/nfsboot/tftp/
WantedBy=multi-user.target
EOF
-chroot "$ROOT" systemctl enable nfsboot-tftp.service
+ln -sf /usr/lib/systemd/system/nfsboot-tftp.service \
+ "$ROOT/etc/systemd/system/multi-user.target.wants/nfsboot-tftp.service"