summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2013-07-24 16:17:17 -0700
committerGary E. Miller <gem@rellim.com>2013-07-24 16:17:17 -0700
commit6c1742bc6470c09edfd2e824935e00f96933144a (patch)
treeaf6454876b10a8dd36459bf062d5114627a48383
parentbbac73ab78bc60199edc27862598ad2f1aeba63b (diff)
downloadgpsd-6c1742bc6470c09edfd2e824935e00f96933144a.tar.gz
Not all systems use group dialout for tty devices. Gentoo, Fedora,
openSuse and more use group uucp. This patch detects Gentoo and adjusts the default gpsd group for Gentoo.
-rw-r--r--SConstruct11
1 files changed, 10 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 0210a341..ec2f1775 100644
--- a/SConstruct
+++ b/SConstruct
@@ -158,9 +158,17 @@ boolopts = (
for (name, default, help) in boolopts:
opts.Add(BoolVariable(name, help, default))
+def_group = "uucp"
+
+# Gentoo, Fedora, opensuse systems use uucp for ttyS* and ttyUSB*
+if os.path.exists("/etc/gentoo-release"):
+ def_group = "uucp"
+else:
+ def_group = "dialout"
+
nonboolopts = (
("gpsd_user", "nobody", "privilege revocation user",),
- ("gpsd_group", "dialout", "privilege revocation group"),
+ ("gpsd_group", def_group, "privilege revocation group"),
("prefix", "/usr/local", "installation directory prefix"),
("limited_max_clients", 0, "maximum allowed clients"),
("limited_max_devices", 0, "maximum allowed devices"),
@@ -169,6 +177,7 @@ nonboolopts = (
("target", "", "cross-development target"),
("sysroot", "", "cross-development system root"),
)
+
for (name, default, help) in nonboolopts:
opts.Add(name, help, default)