[system-tools] Arch Linux users-admin

Link Dupont <[email protected]>
Newsgroups gmane.comp.gnome.ximian.setup-tool
Message-ID <41e4e5fb041017223550a1a849__6642.95405517823$1098077746$gmane$org@mail.gmail.com>
Hey GST hackers,

Here's a first attempt at a users-admin patch. I have tested reading &
writing and it seems to work okay. Obviously, this isn't a hefty
patch, since Arch Linux adheres to all the standards as far as user
management goes. I didn't include an archlinux.png in the patch,
though I can provide one. This patch is generated off of anonymous
CVS.

Cheers, Link
-- 
Peace love and penguins

_______________________________________________
system-tools-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/system-tools-list
gst-users-admin-archlinux-1.patch (application/octet-stream, 2.8 KB)
--- gnome-system-tools/backends/users-conf.in	2004-09-14 04:33:03.000000000 -0700
+++ gnome-system-tools.patched/backends/users-conf.in	2004-10-17 21:52:21.000000000 -0700
@@ -78,6 +78,7 @@
               "slackware-8.0.0", "slackware-8.1", "slackware-9.0.0", "slackware-9.1.0", "slackware-10.0.0",
               "freebsd-4", "freebsd-5", "freebsd-6",
               "gentoo",
+	      "archlinux-0.7",
               "pld-1.0", "pld-1.1", "pld-1.99", "fedora-1", "fedora-2", "specifix", "vine-3.0", "vine-3.1");
 
 $description =<<"end_of_description;";
@@ -360,6 +361,7 @@
   'vine-3.0'        => $rh_logindefs_defaults,
   'vine-3.1'        => $rh_logindefs_defaults,
   'gentoo'	        => $gentoo_logindefs_defaults,
+  'archlinux-0.7'   => $gentoo_logindefs_defaults,
   'slackware-9.1.0' => $gentoo_logindefs_defaults,
   'slackware-10.0.0' => $gentoo_logindefs_defaults,
   'freebsd-4'       => $freebsd_logindefs_defaults,
@@ -843,7 +845,7 @@
     $fname = "-f \'" . $fname . "\'";
     $home_phone = "-h \'" . $home_phone . "\'";
 
-    if ($gst_dist =~ /^debian/)
+    if ($gst_dist =~ /^debian/  || $gst_dist =~ /^archlinux/)
     {
       $office = "-r \'" . $office . "\'";
       $office_phone = "-w \'" . $office_phone . "\'";
--- gnome-system-tools/backends/platform.pl.in	2004-10-17 22:29:00.000000000 -0700
+++ gnome-system-tools.patched/backends/platform.pl.in	2004-10-16 09:17:33.000000000 -0700
@@ -76,6 +76,7 @@
   "freebsd-5"       => "FreeBSD 5",
   "freebsd-6"       => "FreeBSD 6",
   "gentoo"          => "Gentoo Linux",
+  "archlinux-0.7"   => "Arch Linux 0.7",
   "pld-1.0"         => "PLD 1.0 Ra",
   "pld-1.1"         => "PLD 1.1 Ra",
   "pld-1.99"        => "PLD 1.99 Ac-pre",
@@ -333,6 +334,23 @@
   return -1;
 }
 
+sub check_archlinux
+{
+  # We do this because Arch puts g-s-t into /opt/gnome.
+  open RELEASE, "/etc/arch-release" or return -1;
+  while (<RELEASE>)
+  {
+    chomp;
+    if (/^Arch Linux (.*) \(.*\)/)
+    {
+      close RELEASE;
+      return "archlinux-$1";
+    }
+  }
+  close RELEASE;
+  return -1;
+}
+
 sub check_linuxppc
 {
   open RELEASE, "$gst_prefix/etc/redhat-release" or return -1;
@@ -440,7 +458,7 @@
     # Red Hat check must run after Vine, Mandrake and Fedora, and Mandrake after BlackPanther
     "Linux" => [ \&check_lsb,      \&check_debian,   \&check_caldera, \&check_suse, \&check_blackpanther, \&check_vine,
                  \&check_fedora, \&check_mandrake, \&check_conectiva, \&check_linuxppc, \&check_redhat,  \&check_openna,
-                 \&check_turbolinux, \&check_slackware, \&check_gentoo,  \&check_pld, \&check_specifix ],
+                 \&check_turbolinux, \&check_slackware, \&check_gentoo,  \&check_pld, \&check_specifix, \&check_archlinux ],
     "FreeBSD" => [ \&check_freebsd ],
     "SunOS"    => [ \&check_solaris ]
                );
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.