Java Mailing List Archive

http://www.redhatconfig.com/

Home » Mandriva Cooker »

Re: [Cooker] Why is harddrake renaming my interfaces on 2008.1 (dunno
about cooker)??

Colin Guthrie

2008-06-12

Replies: Find Java Web Hosting

Author LoginPost Reply
Olivier Blin wrote:
> Colin Guthrie <cguthrie@(protected):
>
>> When harddrake is started at boot, it does say "FAILED" which is
>> interesting.
>>
>> So, I've disabled harddrake for now, but the question is..... why is
>> it renaming things in the first place?? Please ask for more info if
>> you want/need it.
>
> My understanding is that it fails early, and thus can never write the
> file containing detected hardware. So it detects "new" hardware at
> every boot.
>
> Any output when you run /usr/share/harddrake/service_harddrake ?
> (might kill your X)

Just following up on this one now that I'm back.... (yeah I know I'm
lazy ;))

[root@(protected)
bad port ssh/tcp


From some simple debugging I found after applying this patch:
--- /usr/share/harddrake/service_harddrake  2008-06-03 21:30:01.000000000
+0100
+++ service_harddrake  2008-06-12 20:01:20.000000000 +0100
@@(protected) @@
      require network::rfswitch;
      network::rfswitch::configure();
      require network::shorewall;
+  print "Debug 1\n";
      network::shorewall::update_interfaces_list();
+  print "Debug 2\n";
      $modules_conf->write;
      next;
   } elsif (member($Ident, qw(ATA_STORAGE CARD_READER RAID_STORAGE
SATA_STORAGE SCSI_CONTROLLER))) {



I got the following results:
[root@(protected)
Debug 1
bad port ssh/tcp


Running "shorewall check" seems fine:
[root@(protected)
Checking...
....
Shorewall configuration verified


grepping for ssh in /etc/shorewall brings nothign interesting:
[root@(protected)/*
/etc/shorewall/rules:ACCEPT       net   $FW         tcp
ssh,auth,http,https,smtp,imaps
/etc/shorewall/shorewall.conf:RSH_COMMAND='ssh ${root}@(protected)}'



But trawling through the shorewall.pm file, I can olny assume the error
is comeing from the line in /etc/shorewall/rules...

This assumption comes from this code in shorewall.pm:

  my @rules = get_config_file(-f
"$::prefix${shorewall_root}/rules.drakx" ? 'rules.drakx' : 'rules');
  my %conf = (disabled => !glob_("$::prefix/etc/rc3.d/S*shorewall"),
          ports => join(' ', map {
             my $e = $_;
             map { "$_/$e->[3]" } split(',', $e->[4]);
          } grep { $_->[0] eq 'ACCEPT' && $_->[1] eq 'net' } @rules),
          );
  push @{$conf{accept_local_users}{$_->[4]}}, $_->[8] foreach grep {
$_->[0] eq 'ACCEPT+' } @rules;
  $conf{redirects}{$_->[3]}{$_->[4]} = $_->[2] foreach grep { $_->[0]
eq 'REDIRECT' } @rules;

Which seems to be where conf->ports comes from...

Which is then used in the error I get here:
  foreach (split ' ', $ports) {
     m!^(\d+(?::\d+)?)/(udp|tcp|icmp)$! or die "bad port $_\n";

(where $ports is passed in from conf->ports).


My shorewall config works fine for me (has done for years). It seems
this is trying to convert this to a rules.drakx file and failing and
causing harddrake to die.

I'm not a perl ninja so I've not really been able to debug much more
than this so perhaps this is actually a bit of a bug?



Col

--

+--------------------------+
|    Colin Guthrie     |
+--------------------------+
| cguthrie(at)mandriva.org |
| http://colin.guthr.ie/ |
+--------------------------+
©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.