From 3ff5c00a50863db6fbafdcc7800a82c5a7cbc71f Mon Sep 17 00:00:00 2001 From: Mark D Horn Date: Wed, 6 Mar 2019 17:50:17 -0800 Subject: [PATCH] Chroot systemctl command for disable auto-update Fixes: 255 We see build problems due to new releases of systemd, so only use it in chroot versus the --root option. Signed-off-by: Mark D Horn --- swupd/swupd.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swupd/swupd.go b/swupd/swupd.go index ca2c936..87215ad 100644 --- a/swupd/swupd.go +++ b/swupd/swupd.go @@ -191,10 +191,10 @@ func (s *SoftwareUpdater) Update() error { // See Issue https://github.com/clearlinux/swupd-client/issues/527 func (s *SoftwareUpdater) DisableUpdate() error { args := []string{ - filepath.Join(s.rootDir, "/usr/bin/systemctl"), - fmt.Sprintf("--root=%s", s.rootDir), + "chroot", + s.rootDir, + "systemctl", "mask", - "--now", "swupd-update.service", "swupd-update.timer", }