From 4aaae019923e9f583c5c069750005b3e95be6ebe Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Sun, 5 Oct 2014 11:31:19 +0100 Subject: Remove chroot calls in configuration extensions. 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. --- nfsboot-server.configure | 6 ++++-- 1 file 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" -- cgit v1.2.1