0106c9b7c3
The System Tools Backends (s-t-b for short) are a set of cross-platform modules for Linux, FreeBSD and other Unix systems. The backends provide a common DBus interface to all platforms to modify or read the system configuration in a distro independent fashion. Historically, access to system configuration has varied deeply across Unix flavours, and concreting a bit more, across Linux distributions, making it near impossible to write desktop tools that could work flawlessly in a cross-platform way. System Tools Backends try to fill this gap, offering a generic and easy way for desktop applications to read and modify configuration details.
57 lines
1.7 KiB
Text
57 lines
1.7 KiB
Text
$NetBSD: patch-ag,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
|
|
|
|
--- Utils/Platform.pm.orig 2008-03-09 09:21:45.000000000 -0400
|
|
+++ Utils/Platform.pm
|
|
@@ -76,6 +76,10 @@ my $PLATFORM_INFO = {
|
|
"slackware-11.0.0" => [ "Slackware", "11.0.0", "" ],
|
|
"slackware-12.0.0" => [ "Slackware", "12.0.0", "" ],
|
|
"bluewhite64-12.0.0" => [ "Bluewhite64", "12.0.0", "" ],
|
|
+ "netbsd-2" => [ "NetBSD", "2", "" ],
|
|
+ "netbsd-3" => [ "NetBSD", "3", "" ],
|
|
+ "netbsd-4" => [ "NetBSD", "4", "" ],
|
|
+ "netbsd-5" => [ "NetBSD", "5", "" ],
|
|
"freebsd-4" => [ "FreeBSD", "4", "" ],
|
|
"freebsd-5" => [ "FreeBSD", "5", "" ],
|
|
"freebsd-6" => [ "FreeBSD", "6", "" ],
|
|
@@ -131,6 +135,9 @@ sub ensure_distro_map
|
|
"fedora-3" => "redhat-7.2",
|
|
"fedora-4" => "redhat-7.2",
|
|
"fedora-5" => "redhat-7.2",
|
|
+ "netbsd-3" => "netbsd-2",
|
|
+ "netbsd-4" => "netbsd-2",
|
|
+ "netbsd-5" => "netbsd-2",
|
|
"freebsd-6" => "freebsd-5",
|
|
"freebsd-7" => "freebsd-5",
|
|
"openna-1.0" => "redhat-6.2",
|
|
@@ -251,6 +258,23 @@ sub check_ark
|
|
return -1;
|
|
}
|
|
|
|
+sub check_netbsd
|
|
+{
|
|
+ my ($sysctl_cmd, @output);
|
|
+
|
|
+ $sysctl_cmd = &Utils::File::locate_tool ("sysctl");
|
|
+ @output = (readpipe("$sysctl_cmd -n kern.version"));
|
|
+ foreach (@output)
|
|
+ {
|
|
+ chomp;
|
|
+ if (/^NetBSD\s([0-9]+)\.\S+.*/)
|
|
+ {
|
|
+ return "netbsd-$1";
|
|
+ }
|
|
+ }
|
|
+ return -1;
|
|
+}
|
|
+
|
|
sub check_freebsd
|
|
{
|
|
my ($sysctl_cmd, @output);
|
|
@@ -391,6 +415,7 @@ sub guess
|
|
[ \&check_distro_file, "/etc/yellowdog-release", "yellowdog", "^Yellow Dog Linux release (\\S+)" ],
|
|
],
|
|
"FreeBSD" => [[ \&check_freebsd ]],
|
|
+ "NetBSD" => [[ \&check_netbsd ]],
|
|
"SunOS" => [[ \&check_solaris ]]
|
|
);
|
|
|