summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2011-September/008173.html
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-04-14 13:46:12 +0000
committerNicolas Vigier <boklm@mageia.org>2013-04-14 13:46:12 +0000
commit1be510f9529cb082f802408b472a77d074b394c0 (patch)
treeb175f9d5fcb107576dabc768e7bd04d4a3e491a0 /zarb-ml/mageia-dev/2011-September/008173.html
parentfa5098cf210b23ab4f419913e28af7b1b07dafb2 (diff)
downloadarchives-1be510f9529cb082f802408b472a77d074b394c0.tar
archives-1be510f9529cb082f802408b472a77d074b394c0.tar.gz
archives-1be510f9529cb082f802408b472a77d074b394c0.tar.bz2
archives-1be510f9529cb082f802408b472a77d074b394c0.tar.xz
archives-1be510f9529cb082f802408b472a77d074b394c0.zip
Add zarb MLs html archivesHEADmaster
Diffstat (limited to 'zarb-ml/mageia-dev/2011-September/008173.html')
-rw-r--r--zarb-ml/mageia-dev/2011-September/008173.html171
1 files changed, 171 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/2011-September/008173.html b/zarb-ml/mageia-dev/2011-September/008173.html
new file mode 100644
index 000000000..708e8cd64
--- /dev/null
+++ b/zarb-ml/mageia-dev/2011-September/008173.html
@@ -0,0 +1,171 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [Mageia-dev] systemd vs dm
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20systemd%20vs%20dm&In-Reply-To=%3C4E747E5A.3060904%40colin.guthr.ie%3E">
+ <META NAME="robots" CONTENT="index,nofollow">
+ <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <LINK REL="Previous" HREF="008172.html">
+ <LINK REL="Next" HREF="008175.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[Mageia-dev] systemd vs dm</H1>
+ <B>Colin Guthrie</B>
+ <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20systemd%20vs%20dm&In-Reply-To=%3C4E747E5A.3060904%40colin.guthr.ie%3E"
+ TITLE="[Mageia-dev] systemd vs dm">mageia at colin.guthr.ie
+ </A><BR>
+ <I>Sat Sep 17 13:02:50 CEST 2011</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="008172.html">[Mageia-dev] systemd vs dm
+</A></li>
+ <LI>Next message: <A HREF="008175.html">[Mageia-dev] systemd vs dm
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#8173">[ date ]</a>
+ <a href="thread.html#8173">[ thread ]</a>
+ <a href="subject.html#8173">[ subject ]</a>
+ <a href="author.html#8173">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>'Twas brillig, and Dick Gevers at 17/09/11 11:40 did gyre and gimble:
+&gt;<i> On Sat, 17 Sep 2011 11:16:57 +0100, Colin Guthrie wrote about Re:
+</I>&gt;<i> [Mageia-dev] systemd vs dm:
+</I>&gt;<i>
+</I>&gt;&gt;<i> Well that's slightly disturbing. It seems that rsyslog was started but
+</I>&gt;&gt;<i> not by systemd.
+</I>&gt;&gt;<i>
+</I>&gt;&gt;<i> Can do do some kind of pstree type analysis (perhaps also using cgroups
+</I>&gt;&gt;<i> stuff) to work out what process actually started rsyslog?
+</I>&gt;<i>
+</I>&gt;<i> pstree is not quite unequivocal, because it shows systemd at the top of
+</I>&gt;<i> every running process, even those surely not started by systemd but e.g. by
+</I>&gt;<i> the current user.
+</I>
+Yeah that's expected. Everything is a child of pid 1 really, but what
+would be interesting is if rsyslog is a direct child of pid 1 or if
+there are any other processes in between, but I guess not.
+
+&gt;<i> But on the other hand systemd has PID 1 so it's reasonable to assume
+</I>&gt;<i> everything stems from it.
+</I>
+Yup.
+
+&gt;<i> Although when I do lsof |grep rsys |grep syst it returns nothing, so
+</I>&gt;<i> perhaps that means rsyslog was not started by systemd: we'd have to compare
+</I>&gt;<i> with a system where systemctl status rsyslog.service gives a better result.
+</I>
+Nah I wouldn't expect rsyslog to know anything specifically about
+systemd, so this would be the expected output.
+
+&gt;<i> &quot;lsof |grep cgrou&quot; returns only one line:
+</I>&gt;<i>
+</I>&gt;<i> systemd 1 root 6r DIR 0,18
+</I>&gt;<i> 0 193 /sys/fs/cgroup/systemd/system
+</I>&gt;<i>
+</I>&gt;<i> I hope this gives some clues.
+</I>
+Sadly not.
+
+What would be useful is to find the pid of rsyslog (mine is 1505), and
+then do:
+[<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">root at jimmy</A> ~]# cat /proc/1505/cgroup
+8:blkio:/
+7:net_cls:/
+6:freezer:/
+5:devices:/
+4:memory:/
+3:cpuacct,cpu:/system/rsyslog.service
+2:cpuset:/
+1:name=systemd:/system/rsyslog.service
+
+
+If it looks similar to mine then it has been started by systemd but it's
+somehow &quot;lost&quot; that info.
+
+
+I wonder, do you do anything special with either /var /var/run or /run
+directories? Are they on separate partitions or anything?
+
+Col
+
+
+
+
+--
+
+Colin Guthrie
+mageia(at)colin.guthr.ie
+<A HREF="http://colin.guthr.ie/">http://colin.guthr.ie/</A>
+
+Day Job:
+ Tribalogic Limited [<A HREF="http://www.tribalogic.net/">http://www.tribalogic.net/</A>]
+Open Source:
+ Mageia Contributor [<A HREF="http://www.mageia.org/">http://www.mageia.org/</A>]
+ PulseAudio Hacker [<A HREF="http://www.pulseaudio.org/">http://www.pulseaudio.org/</A>]
+ Trac Hacker [<A HREF="http://trac.edgewall.org/">http://trac.edgewall.org/</A>]
+</PRE>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="008172.html">[Mageia-dev] systemd vs dm
+</A></li>
+ <LI>Next message: <A HREF="008175.html">[Mageia-dev] systemd vs dm
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#8173">[ date ]</a>
+ <a href="thread.html#8173">[ thread ]</a>
+ <a href="subject.html#8173">[ subject ]</a>
+ <a href="author.html#8173">[ author ]</a>
+ </LI>
+ </UL>
+
+<hr>
+<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
+mailing list</a><br>
+</body></html>
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569
package harddrake::data;

use strict;
use detect_devices;
use common;
use modules;

our @ISA = qw(Exporter);
our @EXPORT_OK = qw(version tree);
our ($version, $sbindir, $bindir) = ("10", "/usr/sbin", "/usr/bin");

my @devices = detect_devices::probeall();

# Update me each time you handle one more devices class (aka configurator)
sub unknown() {
    grep { $_->{media_type} !~ /BRIDGE|class\|Mouse|DISPLAY|Hub|MEMORY_RAM|MULTIMEDIA_(VIDEO|AUDIO|OTHER)|NETWORK|Printer|SERIAL_(USB|SMBUS)|STORAGE_(IDE|OTHER|RAID|SCSI)|SYSTEM_OTHER|tape|UPS/
	       && !member($_->{driver}, qw(cpia_usb cyber2000fb forcedeth ibmcam megaraid mod_quickcam nvnet ohci1394 ov511 ov518_decomp scanner ultracam usbvideo usbvision))
	       && $_->{driver} !~ /^ISDN|Mouse:USB|Removable:zip|class\|Mouse|sata|www.linmodems.org/
	       && $_->{type} ne 'network'
	       && $_->{description} !~ /Alcatel|ADSL Modem/;
	   } @devices;
}

my @alrd_dected;
sub f { 
    my @devs = grep { !member(pciusb_id($_), @alrd_dected) } grep { $_ } @_;
    push @alrd_dected, map { pciusb_id($_) } @devs;
    @devs;
}


# tree format ("CLASS_ID", "type", "type_icon", configurator, detect_sub)
# NEVER, NEVER alter CLASS_ID or you'll see harddrake2 service detect changes
# in hw configuration ... :-(

# FIXME: add translated items

sub is_removable { $_[0] =~ /FLOPPY|ZIP|DVDROM|CDROM|BURNER/ }

sub set_removable_configurator {
    my ($class, $device) = @_;
    return "/usr/sbin/diskdrake --removable=$device->{device}" if is_removable($class);
 }

sub set_removable_auto_configurator {
    my ($class, $device) = @_;
    return "/usr/sbin/drakupdate_fstab --no-flag --auto --add $device->{device}" if is_removable($class);
}

sub set_removable_remover {
    my ($class, $device) = @_;
    return "/usr/sbin/drakupdate_fstab --no-flag --del $device->{device}" if is_removable($class);
}

my $modules_conf = modules::any_conf->read;

# Format is (HW class ID, l18n class name, icon, config tool , is_to_be_detected_on_boot)
our @tree =
    (
     {
      class => "FLOPPY",
      string => N("Floppy"),
      icon => "floppy.png",
      configurator => "",
      detector => \&detect_devices::floppies,
      checked_on_boot => 1,
      automatic => 1,
     },

     {
      class => "ZIP",
      string => N("Zip"),
      icon => "floppy.png",
      configurator => "",
      detector => sub {
	  my ($options) = @_;
	  if ($options->{PARALLEL_ZIP_DETECTION}) {
	      modules::load_parallel_zip($modules_conf) and $modules_conf->write;
	  }
	  detect_devices::zips();
      },
      checked_on_boot => 1,
      automatic => 1,
     },

     {
      class => "HARDDISK",
      string => N("Hard Disk"),
      icon => "harddisk.png",
      configurator => "$sbindir/diskdrake",
      detector => sub { f(detect_devices::hds()) },
      checked_on_boot => 0,
     },

     {
      class => "CDROM",
      string => N("CDROM"),
      icon => "cd.png",
      configurator => "",
      detector => sub { grep { !(detect_devices::isBurner($_) || detect_devices::isDvdDrive($_)) } &detect_devices::cdroms },
      checked_on_boot => 1,
      automatic => 1,
     },

     {
      class => "BURNER",
      string => N("CD/DVD burners"),
      icon => "cd.png",
      configurator => "",
      detector => \&detect_devices::burners,
      checked_on_boot => 1,
      automatic => 1,
     },

     {
      class => "DVDROM",
      string => N("DVD-ROM"),
      icon => "cd.png",
      configurator => "",
      detector => sub { grep { ! detect_devices::isBurner($_) } detect_devices::dvdroms() },
      checked_on_boot => 1,
      automatic => 1,
     },

     {
      class => "TAPE",
      string => N("Tape"),
      icon => "tape.png",
      configurator => "",
      detector => \&detect_devices::tapes,
      checked_on_boot => 0,
     },

     # AGP devices must be detected prior to video cards because some DRM drivers doesn't like be loaded
     # after agpgart thus order in /etc/modprobe.preload is important (modules.pm should enforce such sorting):
     {
      class => "AGP",
      string => N("AGP controllers"),
      icon => "memory.png",
      configurator => "",
      detector => sub { f(detect_devices::probe_category('various/agpgart')) },
      checked_on_boot => 1,
     },

     {
      class => "VIDEO",
      string => N("Videocard"),
      icon => "video.png",
      configurator => "$sbindir/XFdrake",
      detector =>  sub { f(grep { $_->{driver} =~ /^(Card|Server):/ || $_->{media_type} =~ /DISPLAY_VGA/ } @devices) },
      checked_on_boot => 1,
     },

     {
      class => "DVB",
      string => N("DVB card"),
      icon => "tv.png",
      detector => sub { f(detect_devices::probe_category('multimedia/dvb')) },
      checked_on_boot => 1,
     },

     {
      class => "TV",
      string => N("Tvcard"),
      icon => "tv.png",
      configurator => "/usr/bin/XawTV",
      detector => sub { f(detect_devices::probe_category('multimedia/tv')),
                          f(grep { $_->{media_type} =~ /MULTIMEDIA_VIDEO/ && $_->{bus} eq 'PCI' } @devices) },
      checked_on_boot => 1,
     },
     
     {
      class => "MULTIMEDIA_OTHER",
      string => N("Other MultiMedia devices"),
      icon => "multimedia.png",
      configurator => "",
      detector => sub { f(grep { $_->{media_type} =~ /MULTIMEDIA_OTHER/ } @devices) },
      checked_on_boot => 0,
     },

     {
      class => "AUDIO",
      string => N("Soundcard"),
      icon => "sound.png",
      configurator => "$sbindir/draksound",
      detector => sub { 
          require list_modules;
          my @modules = list_modules::category2modules('multimedia/sound');
          f(grep { $_->{media_type} =~ /MULTIMEDIA_AUDIO/  || member($_->{driver}, @modules) } @devices);
      },
      checked_on_boot => 1,
     },

     {
      class => "WEBCAM",
      string => N("Webcam"),
      icon => "webcam.png",
      configurator => "",
      detector => sub { 
          require list_modules;
          my @modules = (list_modules::category2modules('multimedia/webcam'), 'Removable:camera');
          f(grep { $_->{media_type} =~ /MULTIMEDIA_VIDEO|Video\|Video Control/ && $_->{bus} ne 'PCI' || member($_->{driver}, @modules) } @devices);
      },
      # managed by hotplug:
      checked_on_boot => 0,
     },

     {
      class => "CPU",
      string => N("Processors"),
      icon => "cpu.png",
      configurator => "",
      detector => sub { detect_devices::getCPUs() },
      # maybe should we install schedutils?
      checked_on_boot => 1,
     },

     {
      class => "ISDN",
      string => N("ISDN adapters"),
      icon => "modem.png",
      configurator => "$sbindir/drakconnect",
      detector => sub { require network::connection::isdn; my $isdn = network::connection::isdn::detect_backend($modules_conf); if_(@$isdn, f(@$isdn)) },
      # we do not check these b/c this need user interaction (auth, ...):
      checked_on_boot => 0,
     },


     {
      class => "USB_AUDIO",
      string => N("USB sound devices"),
      icon => "sound.png",
      configurator => "",
      detector => sub { f(detect_devices::probe_category('multimedia/usb_sound')) },
      checked_on_boot => 0,
     },

     {
      class => "RADIO",
      string => N("Radio cards"),
      icon => "tv.png",
      configurator => "",
      detector => sub { f(detect_devices::probe_category('multimedia/radio')) },
      checked_on_boot => 0,
     },

     {
      class => "ATM",
      string => N("ATM network cards"),