diff options
author | Gary E. Miller <gem@rellim.com> | 2013-07-24 16:17:17 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2013-07-24 16:17:17 -0700 |
commit | 6c1742bc6470c09edfd2e824935e00f96933144a (patch) | |
tree | af6454876b10a8dd36459bf062d5114627a48383 | |
parent | bbac73ab78bc60199edc27862598ad2f1aeba63b (diff) | |
download | gpsd-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-- | SConstruct | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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) |