Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[einit] versions 0.14.0.500 - 0.15.2 -- happy new year
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... , 17, 18, 19  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Tue Jan 30, 2007 6:53 pm    Post subject: Reply with quote

BastianBalthazarBux wrote:
mdeininger wrote:

BastianBalthazarBux wrote:
Now the only challenge remain to redirect /dev/tty1 to a file to get a meaningful start log

well, there's an option in einit.xml that specifies the stdout and stderr files, you could try that... need to mount / r/o, though, but that should be easy with a vserver :D

mmh, not mounted root r/o because in that case all the output is lost, using /somepath/xyz return at least the output to stderr of "einit-control power down"

with the following configuration it work fine, however there are some hacks:

  • disable "einit-mount" module and provide faked mount/{system,critical}
  • /bin/sleep used as a no-op server
  • tweaking of einit.xml needed


einit.xml diff

Code:

diff -a einit.xml.orig einit.xml
8c8,9
<     <load pattern-allow=".*\.so" />
---
> <!--    <load pattern-allow=".*\.so" /> -->
>      <load pattern-allow=".*\.so" pattern-disallow="^einit-mount.*" />
945,952d945
<  <mode id="boot">
<   <enable services="sysconf:mount/local:hostname:tty:keyboard:ipc:syslog:network:dbus:hal:utmp" critical="mount/critical:tty" />
<   <ttys s="tty1-regular" />
<  </mode>
<  <mode id="default" base="boot">
<   <enable services="audio:portmap:clock:xdm:swap:mount/remote" />
<   <ttys s="tty2-regular:tty3-regular:tty4-regular:tty5-regular:tty6-regular" />
<  </mode>


local.xml

Code:

<?xml version="1.0" encoding="UTF-8" ?>
<einit>
<!-- you will need to modify this file -->
 <configuration>
  <feedback>
   <visual>
    <std-io stdin="/root/einit-stdin"
      stdout="/root/einit-stout"
      stderr="/root/einit-stderr"
      verbose-output="/root/einit-verbose" />
   </visual>
  </feedback>

  <network>
   <hostname s="VSERVERHOSTNAME" />
   <domainname s="VSERVERDOMAINNAME" />
  </network>
 </configuration>

 <services>
  <virtual>
   <module>
    <daemon id="mount-system"
     name="mount-system"
     provides="mount/system"
     command="/bin/sleep 3611"
     restart="yes" />

    <daemon id="mount-critical"
     name="mount-critical"
     provides="mount/critical"
     command="/bin/sleep 3611"
     restart="yes" />
   </module>
  </virtual>

  <prefer>
   <syslog s="daemon-syslog-ng" />
  </prefer>

  <alias>
   <vboot group="mount-system:mount-critical" seq="any-iop" />
  </alias>
 </services>

 <mode id="boot">
  <enable services="vboot:sysconf:hostname:keyboard:ipc:syslog" critical="ipc"/>
  <ttys s="tty2-regular" />
 </mode>
 <mode id="default" base="boot">
  <enable services="syslog" />
  <ttys s="" />
 </mode>
</einit>


nice hack =)
although, technically it's not a hack ;)
just a hint: with shell-type modules you could've used enable="/bin/true" and disable="/bin/true", instead of making a dummy module that just sleeps and needs to be revived every now and then ;)

BastianBalthazarBux wrote:
EDIT Tue Jan 30 16:50:35 UTC 2007
some daemons (pdns) require a different command to shut it down, may worth to switch to the <shell> way to use enable/disable cmds ?

but, that's what <shell /> is for? the daemon is specifically for daemons that can be revived and that don't fork, shell is for everything else, be it a daemon or just a simple command ;)

BastianBalthazarBux wrote:
EDIT ... some minutes later
another nice option would be an element einit/configuration/services/virtual/monit with the same properties as daemon (at least provide) that can be used to non local daemons running.
example: we have a mysql daemon running in another chroot, /var/run/mysqld/ is bind-mounted between the various chroots, to provide mysqld it can be enough to test for the socket mysqld create:
[[ -S /var/run/mysqld/mysqld.sock ]] && echo "hurray"
, it may be a very interesting feature also for all those people running an home network

yes, that could be done i think
you mean something that just checks if its up and then returns OK/Failure when tried to be activated depending on the status of things like a pipe or a TCP/UDP port?

that does indeed make a lot of sense with clusters of vservers and the like...
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
BastianBalthazarBux
Retired Dev
Retired Dev


Joined: 10 Dec 2004
Posts: 78

PostPosted: Tue Jan 30, 2007 7:40 pm    Post subject: Reply with quote

mdeininger wrote:
just a hint: with shell-type modules you could've used enable="/bin/true" and disable="/bin/true", instead of making a dummy module that just sleeps and needs to be revived every now and then ;)


Doh, changed :)

mdeininger wrote:

BastianBalthazarBux wrote:
EDIT Tue Jan 30 16:50:35 UTC 2007
some daemons (pdns) require a different command to shut it down, may worth to switch to the <shell> way to use enable/disable cmds ?

but, that's what <shell /> is for? the daemon is specifically for daemons that can be revived and that don't fork, shell is for everything else, be it a daemon or just a simple command ;)


net-dns/pdns does something strange, it start up as daemon, then use ipc to shut down, ie:
command="/usr/sbin/pdns_server --config-dir=/etc/powerdns/ --daemon=no --guardian=no"

#ps ax | grep pdns
5470 ? Sl 0:00 /usr/sbin/pdns_server --daemon=no --guardian=no --config-dir=/etc/powerdns/
<edit>without childs</edit>

disable="/usr/bin/pdns_control --config-dir=/etc/powerdns/ quit"

this is a mixed case, it's also a corner case, it's the only one I know that do it (not counting einit itself ;) )
also the <shell> way using "--daemon=yes --guardian=yes" is perfectly fine.
Please forgot it :P

mdeininger wrote:

BastianBalthazarBux wrote:
EDIT ... some minutes later
another nice option would be an element einit/configuration/services/virtual/monit with the same properties as daemon (at least provide) that can be used to non local daemons running.
example: we have a mysql daemon running in another chroot, /var/run/mysqld/ is bind-mounted between the various chroots, to provide mysqld it can be enough to test for the socket mysqld create:
[[ -S /var/run/mysqld/mysqld.sock ]] && echo "hurray"
, it may be a very interesting feature also for all those people running an home network

yes, that could be done i think
you mean something that just checks if its up and then returns OK/Failure when tried to be activated depending on the status of things like a pipe or a TCP/UDP port?
that does indeed make a lot of sense with clusters of vservers and the like...

exactly, simply check the return code of a program (that can do pings or existence check) should be enough without duplicating the effort of a full monitoring suite


EDIT: pdns as <shell>

Code:
     <shell id="shell-powerdns"
      name="powerdns"
      uid="powerdns"
      provides="dns"
      requires="network:mount/critical"
      enable="/usr/sbin/pdns_server --config-dir=/etc/powerdns/ --daemon=no --guardian=no"
      disable="/usr/bin/pdns_control --config-dir=/etc/powerdns/ stop"
      reload="/usr/bin/pdns_control --config-dir=/etc/powerdns/ cycle" />

also:

Code:
    <daemon id="daemon-clamav"
      name="Clam Anti-Virus Scanner"
      provides="antivir"
      requires="mount/critical"
      prepare="rm -f /var/run/clamav/clamd.sock"
      command="/usr/sbin/clamd --config-file=/etc/clamd.conf"
      restart="yes" />

and

Code:
    <shell id="shell-amavisd"
     name="Interface between the MTA and content checkers."
     provides="amavisd"
     requires="mount/critical"
     enable="/usr/sbin/amavisd start"
     disable="/usr/sbin/amavisd stop"
     reload="/usr/sbin/amavisd reload"
     restart="yes" />


requires not fully checked


Last edited by BastianBalthazarBux on Tue Jan 30, 2007 7:59 pm; edited 2 times in total
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Tue Jan 30, 2007 7:45 pm    Post subject: Reply with quote

BastianBalthazarBux wrote:
mdeininger wrote:
just a hint: with shell-type modules you could've used enable="/bin/true" and disable="/bin/true", instead of making a dummy module that just sleeps and needs to be revived every now and then ;)


Doh, changed :)

mdeininger wrote:

BastianBalthazarBux wrote:
EDIT Tue Jan 30 16:50:35 UTC 2007
some daemons (pdns) require a different command to shut it down, may worth to switch to the <shell> way to use enable/disable cmds ?

but, that's what <shell /> is for? the daemon is specifically for daemons that can be revived and that don't fork, shell is for everything else, be it a daemon or just a simple command ;)


net-dns/pdns does something strange, it start up as daemon, then use ipc to shut down, ie:
command="/usr/sbin/pdns_server --config-dir=/etc/powerdns/ --daemon=no --guardian=no"

#ps ax | grep pdns
5470 ? Sl 0:00 /usr/sbin/pdns_server --daemon=no --guardian=no --config-dir=/etc/powerdns/

disable="/usr/bin/pdns_control --config-dir=/etc/powerdns/ quit"

this is a mixed case, it's also a corner case, it's the only one I know that do it (not counting einit itself ;) )
also the <shell> way using "--daemon=yes --guardian=yes" is perfectly fine.
Please forgot it :P

mdeininger wrote:

BastianBalthazarBux wrote:
EDIT ... some minutes later
another nice option would be an element einit/configuration/services/virtual/monit with the same properties as daemon (at least provide) that can be used to non local daemons running.
example: we have a mysql daemon running in another chroot, /var/run/mysqld/ is bind-mounted between the various chroots, to provide mysqld it can be enough to test for the socket mysqld create:
[[ -S /var/run/mysqld/mysqld.sock ]] && echo "hurray"
, it may be a very interesting feature also for all those people running an home network

yes, that could be done i think
you mean something that just checks if its up and then returns OK/Failure when tried to be activated depending on the status of things like a pipe or a TCP/UDP port?
that does indeed make a lot of sense with clusters of vservers and the like...

exactly, simply check the return code of a program (that can do pings or existence check) should be enough without duplicating the effort of a full monitoring suite


daemon mods dont have disable=

you need a
Code:
<shell id="shell-pdns"
 name="pdns"
 provides="pdns"
 requires="mount/critical:net-lo"
 enable="pdns_server --daemon=yes --guardian=yes --config-dir=/etc/powerdns/"
 disable="/usr/bin/pdns_control --config-dir=/etc/powerdns/ quit" />

_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
BastianBalthazarBux
Retired Dev
Retired Dev


Joined: 10 Dec 2004
Posts: 78

PostPosted: Tue Jan 30, 2007 7:57 pm    Post subject: Reply with quote

rmh3093 wrote:
daemon mods dont have disable=

you need a
Code:
<shell id="shell-pdns"
 name="pdns"
 provides="pdns"
 requires="mount/critical:net-lo"
 enable="pdns_server --daemon=yes --guardian=yes --config-dir=/etc/powerdns/"
 disable="/usr/bin/pdns_control --config-dir=/etc/powerdns/ quit" />


that was the point discussed, if also <daemon> should have the "disable" <shell> equivalent,
I've edited the previous post with the services I'm adding to the local.xml right now (including the pdns one)
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Tue Jan 30, 2007 7:58 pm    Post subject: Reply with quote

BastianBalthazarBux wrote:
rmh3093 wrote:
daemon mods dont have disable=

you need a
Code:
<shell id="shell-pdns"
 name="pdns"
 provides="pdns"
 requires="mount/critical:net-lo"
 enable="pdns_server --daemon=yes --guardian=yes --config-dir=/etc/powerdns/"
 disable="/usr/bin/pdns_control --config-dir=/etc/powerdns/ quit" />


that was the point discussed, if also <daemon> should have the "disable" <shell> equivalent,
I've edited the previous post with the services I'm adding to the local.xml right now (including the pdns one)

well, there's prepare/cleanup, but cleanup runs after the command= was killed...

that's kind of the main difference between daemon and shell tho...
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
BastianBalthazarBux
Retired Dev
Retired Dev


Joined: 10 Dec 2004
Posts: 78

PostPosted: Tue Jan 30, 2007 8:05 pm    Post subject: Reply with quote

mdeininger wrote:
BastianBalthazarBux wrote:
rmh3093 wrote:
daemon mods dont have disable=

you need a
Code:
<shell id="shell-pdns"
 name="pdns"
 provides="pdns"
 requires="mount/critical:net-lo"
 enable="pdns_server --daemon=yes --guardian=yes --config-dir=/etc/powerdns/"
 disable="/usr/bin/pdns_control --config-dir=/etc/powerdns/ quit" />


that was the point discussed, if also <daemon> should have the "disable" <shell> equivalent,
I've edited the previous post with the services I'm adding to the local.xml right now (including the pdns one)

well, there's prepare/cleanup, but cleanup runs after the command= was killed...

that's kind of the main difference between daemon and shell tho...


Yay, and after short review it fall in the "who care?" category, it's a rare case that can be easily solved otherwise, please forget the disable for daemon stuff.
Back to top
View user's profile Send private message
BastianBalthazarBux
Retired Dev
Retired Dev


Joined: 10 Dec 2004
Posts: 78

PostPosted: Tue Jan 30, 2007 8:07 pm    Post subject: Reply with quote

BastianBalthazarBux wrote:
mdeininger wrote:
just a hint: with shell-type modules you could've used enable="/bin/true" and disable="/bin/true", instead of making a dummy module that just sleeps and needs to be revived every now and then ;)


Doh, changed :)

mdeininger wrote:

BastianBalthazarBux wrote:
EDIT Tue Jan 30 16:50:35 UTC 2007
some daemons (pdns) require a different command to shut it down, may worth to switch to the <shell> way to use enable/disable cmds ?

but, that's what <shell /> is for? the daemon is specifically for daemons that can be revived and that don't fork, shell is for everything else, be it a daemon or just a simple command ;)


net-dns/pdns does something strange, it start up as daemon, then use ipc to shut down, ie:
command="/usr/sbin/pdns_server --config-dir=/etc/powerdns/ --daemon=no --guardian=no"

#ps ax | grep pdns
5470 ? Sl 0:00 /usr/sbin/pdns_server --daemon=no --guardian=no --config-dir=/etc/powerdns/
<edit>without childs</edit>

disable="/usr/bin/pdns_control --config-dir=/etc/powerdns/ quit"

this is a mixed case, it's also a corner case, it's the only one I know that do it (not counting einit itself ;) )
also the <shell> way using "--daemon=yes --guardian=yes" is perfectly fine.
Please forgot it :P

mdeininger wrote:

BastianBalthazarBux wrote:
EDIT ... some minutes later
another nice option would be an element einit/configuration/services/virtual/monit with the same properties as daemon (at least provide) that can be used to non local daemons running.
example: we have a mysql daemon running in another chroot, /var/run/mysqld/ is bind-mounted between the various chroots, to provide mysqld it can be enough to test for the socket mysqld create:
[[ -S /var/run/mysqld/mysqld.sock ]] && echo "hurray"
, it may be a very interesting feature also for all those people running an home network

yes, that could be done i think
you mean something that just checks if its up and then returns OK/Failure when tried to be activated depending on the status of things like a pipe or a TCP/UDP port?
that does indeed make a lot of sense with clusters of vservers and the like...

exactly, simply check the return code of a program (that can do pings or existence check) should be enough without duplicating the effort of a full monitoring suite


RE-EDIT: pdns as <shell> (need dinner, aka daemon and guardian need to be "yes")

Code:
     <shell id="shell-powerdns"
      name="powerdns"
      uid="powerdns"
      provides="dns"
      requires="network:mount/critical"
      enable="/usr/sbin/pdns_server --config-dir=/etc/powerdns/ --daemon=yes --guardian=yes"
      disable="/usr/bin/pdns_control --config-dir=/etc/powerdns/ stop"
      reload="/usr/bin/pdns_control --config-dir=/etc/powerdns/ cycle" />

also:

Code:
    <daemon id="daemon-clamav"
      name="Clam Anti-Virus Scanner"
      provides="antivir"
      requires="mount/critical"
      prepare="rm -f /var/run/clamav/clamd.sock"
      command="/usr/sbin/clamd --config-file=/etc/clamd.conf"
      restart="yes" />

and

Code:
    <shell id="shell-amavisd"
     name="Interface between the MTA and content checkers."
     provides="amavisd"
     requires="mount/critical"
     enable="/usr/sbin/amavisd start"
     disable="/usr/sbin/amavisd stop"
     reload="/usr/sbin/amavisd reload"
     restart="yes" />


requires not fully checked
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Wed Jan 31, 2007 3:59 pm    Post subject: Reply with quote

magnus... is sysctl handled in sysconf or do we need this module below?

Code:
     <shell id="shell-sysctl"
      name="sysctl - configure kernel parameters at runtime"
      provides="sysctl"
      requires="sysconf"
      enable="sysctl -q -p /etc/sysctl.conf"
      disable="/bin/true"
      restart="no" />

_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Thu Feb 01, 2007 8:22 am    Post subject: Reply with quote

rmh3093 wrote:
magnus... is sysctl handled in sysconf or do we need this module below?

Code:
     <shell id="shell-sysctl"
      name="sysctl - configure kernel parameters at runtime"
      provides="sysctl"
      requires="sysconf"
      enable="sysctl -q -p /etc/sysctl.conf"
      disable="/bin/true"
      restart="no" />

i think we're going to need that as well, although i suppose it *should* be handled in sysconf sooner or later :) (i.e. doesn't do it yet ;))
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Thu Feb 01, 2007 10:13 pm    Post subject: Reply with quote

okay guys -714 features new --wtf code: some cleanups, and einit will bitch about missing variables from modules, which will look something like this:
Code:

mdeininger@helios ~/projects/einit/einit/sandbox $ sbin/einit --sandbox --wtf
eINIT 0.15.3-svn-712: Initialising: Linux
 >> parsing "etc/einit/einit.xml".
 >> parsing "etc/einit/sandbox.xml".
 * you didn't edit your local.xml to specify your root-filesystem.
 * cannot stat device "chronos:/media/storage-1/home" from node "/home", the error was "No such file or directory".
 * cannot stat device "/dev/BOOT" from node "/boot", the error was "No such file or directory".
 * cannot stat device "/dev/ROOT" from node "/", the error was "No such file or directory".
 * cannot stat device "host:/media/storage-1" from node "/media/storage-1", the error was "No such file or directory".
 * cannot stat device "chronos:/media/storage-0" from node "/media/storage-0", the error was "No such file or directory".
 * you should take your time to specify a hostname, go edit local.xml, look for the hostname-element.
 * you should take your time to specify a domainname if you use NIS/YP services, go edit local.xml, look for the domainname-element.
 * module: shell-net-static-eth1: undefined variable: configuration-network-interfaces-eth1/.*
 * module: shell-dummy-1: undefined variable: configuration-feedback-visual-std-io/.*
 * module: shell-eth0-dummy: undefined node: kernel_module_eth0
 * module: shell-net-ath0: undefined node: configuration-network-wireless-ssid
 * module: shell-net-static-loopback: undefined variable: configuration-network-interfaces-lo/.*
 * module: shell-kern-sound: undefined node: configuration-kernel-modules-sound
 * module: shell-swap: undefined node: configuration-system-swap


(note: you don't use --sandbox, that's just the command i ran in my test environment. just use regular --wtf ;) )

-715: run "examine configuration" (i.e. --wtf) after any ipc call with "update configuration".
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Fri Feb 02, 2007 3:56 pm    Post subject: Reply with quote

hey, just saw this change since I also wanted to remove this "gateway" rmh3093 : i am 95% sure we dont need to specify a default gw for net.lo
But I'd test if ${interface}_gateway} is empty, and if it isn't, then I'd add the default gateway. This way we could keep using the template for net-lo.


EDIT: why can't I "swith back" to the previous mode with erc switch-mode cons, givent that I'm in the default mode right now and
in local.xml:
 <mode id="cons" base="boot:first">
  <enable services="audio:mpd:kern-arbitrary" />
 </mode>
 
 <mode id="default" base="cons:first:boot">
  <enable services="xuser:urxvtd:printing" />
 </mode>


:?:

the comand just does nothing ::/


EDIT2: for the shell id="shell-hpiod", killall hpiod doesn't kill hpiod here, but killall -9 does, I don't know if I'm the only one in this case, but if not, this could be updated?
_________________
The End of the Internet!


Last edited by truc on Fri Feb 02, 2007 4:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Fri Feb 02, 2007 4:05 pm    Post subject: Reply with quote

truc wrote:
hey, just saw this change since I also wanted to remove this "gateway" rmh3093 : i am 95% sure we dont need to specify a default gw for net.lo
But I'd test if ${interface}_gateway} is empty, and if it isn't, then I'd add the default gateway. This way we could keep using the template for net-lo.

hey, that's a nice idea, actually =)

truc wrote:
EDIT: why can't I "swith back" to the previous mode with erc switch-mode cons, givent that I'm in the default mode right now and
in local.xml:
 <mode id="cons" base="boot:first">
  <enable services="audio:mpd:kern-arbitrary" />
 </mode>
 
 <mode id="default" base="cons:first:boot">
  <enable services="xuser:urxvtd:printing" />
 </mode>


:?:

the comand just does nothing ::/

uhm, it's because both modes only enable stuff... so, when switching from default to cons, einit is only told to enable audio, mpd and kern-arbitrary... which is already up if you come from default...
if you want to have things disabled when switching from default to cons, try:
Code:
<mode id="cons" base="boot:first">
  <enable services="audio:mpd:kern-arbitrary" />
  <disable services="xuser:urxvtd:printing" />
 </mode>


or something similar :)
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Fri Feb 02, 2007 5:13 pm    Post subject: Reply with quote

magnus: did you see my wpa_supplicant template beginnings that I posted a few posts (maybe more than a few now) ago? that would be a nice addition to einit if you can get it working, it would be nice to have a template for (static,dhcpcd,dhclient,wpa_supplicant, bridging, bonding,tun/tap)
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Sat Feb 03, 2007 9:41 am    Post subject: Reply with quote

rmh3093 wrote:
magnus: did you see my wpa_supplicant template beginnings that I posted a few posts (maybe more than a few now) ago? that would be a nice addition to einit if you can get it working, it would be nice to have a template for (static,dhcpcd,dhclient,wpa_supplicant, bridging, bonding,tun/tap)

oh, heh, yeah you're right, sorry must've skimmed over that :oops:

k, i'll have lots of time to chill and mess with things this evening, not to worry! =)

btw, i fixed some things with einit-control -- it should auto-enable the ansi codes, be a lot less likely to mess up and get stuck + it should return some proper error codes for scripts :)
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
UberPinguin
Guru
Guru


Joined: 20 Nov 2005
Posts: 510
Location: 2416.94 Miles From Home

PostPosted: Sat Feb 03, 2007 6:24 pm    Post subject: Reply with quote

It should probably be noted somewhere that the textual feedback module only really works if you have framebuffer support. I tried booting w/ a new video card this week (old laptop died), and without fb, the textual feedback is all screwed up.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Sat Feb 03, 2007 8:36 pm    Post subject: Reply with quote

UberPinguin wrote:
It should probably be noted somewhere that the textual feedback module only really works if you have framebuffer support. I tried booting w/ a new video card this week (old laptop died), and without fb, the textual feedback is all screwed up.

thats weird... my it looks fine on my laptop with out framebuffer.... its just too big and it dosent all fit on my screen ;) idk why you would have such problems
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
UberPinguin
Guru
Guru


Joined: 20 Nov 2005
Posts: 510
Location: 2416.94 Miles From Home

PostPosted: Sat Feb 03, 2007 10:33 pm    Post subject: Reply with quote

Hm, well when a module's status is updated it adds another line instead of changing the existing one. For example,
Code:
 [ ENAB ]  Audio (ALSA): <...>
Instead of changing the [ ENAB ] to [ DISA ], it does this:
Code:
[ ENAB ]  Audio (ALSA):
<...>
[ DISA ]  Audio (ALSA):
<...>
With the messages that would ordinarily show up to the right of the module name instead scrolling underneath it. IDK, maybe this old Latitude C840 is just buggy in that regard :?
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Sat Feb 03, 2007 11:23 pm    Post subject: Reply with quote

ahh you are right, i didnt realize that was because of lack of frambuffer, i thought that had to do with not enough terminal columns or something
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Sun Feb 04, 2007 1:09 pm    Post subject: Reply with quote

well, it is due to not enough columns on the terminal line actually =)

you could disable the use of ansi codes... that would make it look a lot less nice but it would work...
or, you could use the tty9 output on tty1 -- the one commented out in einit.xml, that uses less lines... :D

i'm trying to get it better by looking at the actual output resolution to get things in order...
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Sun Feb 04, 2007 5:24 pm    Post subject: Reply with quote

truc wrote:
hey, just saw this change since I also wanted to remove this "gateway" rmh3093 : i am 95% sure we dont need to specify a default gw for net.lo
But I'd test if ${interface}_gateway} is empty, and if it isn't, then I'd add the default gateway. This way we could keep using the template for net-lo.


well, I did it, this afternoon:
Code:
    <shell-template id="template-shell-net-static"
     name="Network (${interface}, static)"
     provides="net-${interface}"
     enable="/sbin/ip addr add ${configuration_network_interfaces_${interface}_address} dev ${interface} ;
      /sbin/ip link set ${interface} up ;
      /sbin/ip route add ${configuration_network_interfaces_${interface}_network} dev ${interface} ;
      if [ ! -z ${configuration_network_interfaces_${interface}_gateway} ]; then
       /sbin/ip route add via ${configuration_network_interfaces_${interface}_gateway};
      fi"
     disable="/sbin/ip link set ${interface} down"
     variables="configuration-network-interfaces-${interface}/.*" />

I've used ip from the package sys-apps/iproute2, I did not try with ifconfig & route, but the following should also work
Code:
    <shell-template id="template-shell-net-static"
     name="Network (${interface}, static)"
     provides="net-${interface}"
     enable="/sbin/ifconfig ${interface} up ${configuration_network_interfaces_${interface}_address};
      route add -net ${configuration_network_interfaces_${interface}_network};
      if [ ! -z ${configuration_network_interfaces_${interface}_gateway} ]; then
       route add default gw ${configuration_network_interfaces_${interface}_gateway};
      fi"
     disable="ifconfig ${interface} down"
     variables="configuration-network-interfaces-${interface}/.*" />



As a side note, I'd notice that the <shell-template id="template-shell-net-dhcp" doesn't set the interface down when it is disable; is it on purpose? or is its disable line just waiting to be completed?



I still have some "unmount" problems, (sometimes I've got the error message : /home/ remounted ro, and detach, but some other times, I have no error message, exept that DISABLING mount/local failed. I suspect some of my services not stopping (correctly), but how can I make einit more verbose about that?



Why do we now have two einit processes?


Why can't I think of something else to ask?
_________________
The End of the Internet!
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Sun Feb 04, 2007 6:16 pm    Post subject: Reply with quote

truc wrote:
truc wrote:
hey, just saw this change since I also wanted to remove this "gateway" rmh3093 : i am 95% sure we dont need to specify a default gw for net.lo
But I'd test if ${interface}_gateway} is empty, and if it isn't, then I'd add the default gateway. This way we could keep using the template for net-lo.


[snip]
ni~ce, thanks a bunch! =)


truc wrote:
As a side note, I'd notice that the <shell-template id="template-shell-net-dhcp" doesn't set the interface down when it is disable; is it on purpose? or is its disable line just waiting to be completed?

i think that was just slacking on my part :blush:

truc wrote:
I still have some "unmount" problems, (sometimes I've got the error message : /home/ remounted ro, and detach, but some other times, I have no error message, exept that DISABLING mount/local failed. I suspect some of my services not stopping (correctly), but how can I make einit more verbose about that?

well, "remounted r/o and detached" is not an error message, actually, it's perfectly fine... mount/local actually FAIL-ing should be nearly impossible tho?

truc wrote:
Why do we now have two einit processes?

that's for quite a while already...
the one as pid=1 is just to reap processes, the other is a separate process that does all the hard work... it helps to make sure einit's core doesn't reap the wrong children of itself (or rather, modules of it), so that they don't deadlock...
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Sun Feb 04, 2007 7:07 pm    Post subject: Reply with quote

oh, I noticed just a few days ago for the two einit processes :oops:

Anyway, I just installed and reboot with 0.15.4-svn-722, and I need to mount /boot:
Code:
 mount /boot/
Cannot create link /etc/mtab~
Perhaps there is a stale lock file?


well, fortunatly, that doesn't prevent me from doing anything :)
_________________
The End of the Internet!
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Sun Feb 04, 2007 7:11 pm    Post subject: Reply with quote

kk, ryan: fixed that template and added it in (you only had a slight typo, you forgot an "o" in "configuration..." ;))

truc: thanks for that iproute2 template, added it as "template-shell-net-static-iproute2" ;)

the original template should bring down the interfaces tho... hmm
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Sun Feb 04, 2007 7:17 pm    Post subject: Reply with quote

mdeininger wrote:
the original template should bring down the interfaces tho... hmm

I was talking about the template-shell-net-dhcp" which didn't shutdown the interface
_________________
The End of the Internet!
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Sun Feb 04, 2007 7:20 pm    Post subject: Reply with quote

truc wrote:
oh, I noticed just a few days ago for the two einit processes :oops:

Anyway, I just installed and reboot with 0.15.4-svn-722, and I need to mount /boot:
Code:
 mount /boot/
Cannot create link /etc/mtab~
Perhaps there is a stale lock file?


well, fortunatly, that doesn't prevent me from doing anything :)

weird....? i've no idea how that would happen, i never manipulate any *~ files?

truc wrote:
mdeininger wrote:
the original template should bring down the interfaces tho... hmm

I was talking about the template-shell-net-dhcp" which didn't shutdown the interface

oh, whoo~~ps :D
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2, 3 ... , 17, 18, 19  Next
Page 18 of 19

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum