The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/distrobuilder/pull/349

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===

From 874c7c61fcd7b68251c377b714e839bf34415185 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.h...@canonical.com>
Date: Tue, 23 Jun 2020 16:45:10 +0200
Subject: [PATCH] generators/lxd-agent: Add symlink workaround for openSUSE

Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
---
 generators/lxd-agent.go | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/generators/lxd-agent.go b/generators/lxd-agent.go
index 251ff05..1b95aa8 100644
--- a/generators/lxd-agent.go
+++ b/generators/lxd-agent.go
@@ -129,7 +129,13 @@ WantedBy=multi-user.target
        }
 
        udevPath := filepath.Join("/", "lib", "udev", "rules.d")
-       if !lxd.PathExists(filepath.Dir(filepath.Join(sourceDir, udevPath))) {
+
+       stat, err := os.Lstat(filepath.Join(sourceDir, "lib", "udev"))
+       if err != nil {
+               return err
+       }
+
+       if stat.Mode()&os.ModeSymlink != 0 || 
!lxd.PathExists(filepath.Dir(filepath.Join(sourceDir, udevPath))) {
                udevPath = filepath.Join("/", "usr", "lib", "udev", "rules.d")
        }
 
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to