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
UberPinguin
Guru
Guru


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

PostPosted: Mon Jan 01, 2007 5:05 pm    Post subject: Reply with quote

Geez... I go away for a couple of days... :)

Thanks for this update; I'm installing right now, can't wait to check it out.

Something that's been annoying me (will find out soon if it's fixed) is that my kern-usb module isn't loading until _everything_ else in default has run - despite being called in boot. I think this may be related to my previous problem with /proc/bus/usb failing to mount during boot - einit wasn't loading the usbcore module in time, even with kern-usb in 'before-mount' (the problem went away when I recompiled with usbcore built in).

Also, I just whipped up this module for HP inkjet / all-in-one printers that use the HPLIP backend. I haven't had a chance to test it (no access to my printer right now), but it should work.
Code:
<daemon id="daemon-hplip"
 name="hplip - HP Printer Backend"
 provides="hplip"
 requires="mount/system:kern-usb"
 command="/sbin/start-stop-daemon --start --quiet --exec /usr/sbin/hpiod; /usr/share/hplip/hpssd.py -x"
 restart="yes" />
I haven't found a way to start hpiod without forking - there's no man page, and no --help output. I posted to the HPLIP-Help list, but it's been a couple of weeks now without any answer. The '-x' will prevent hpssd.py from backgrounding though, so that part should be OK. Coincidentally, after writing this I was looking for the 'before/after' behavior that you happen to have added in this latest release :D
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


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

PostPosted: Mon Jan 01, 2007 5:18 pm    Post subject: Reply with quote

UberPinguin wrote:
Geez... I go away for a couple of days... :)

Thanks for this update; I'm installing right now, can't wait to check it out.

Something that's been annoying me (will find out soon if it's fixed) is that my kern-usb module isn't loading until _everything_ else in default has run - despite being called in boot. I think this may be related to my previous problem with /proc/bus/usb failing to mount during boot - einit wasn't loading the usbcore module in time, even with kern-usb in 'before-mount' (the problem went away when I recompiled with usbcore built in).

Also, I just whipped up this module for HP inkjet / all-in-one printers that use the HPLIP backend. I haven't had a chance to test it (no access to my printer right now), but it should work.
Code:
<daemon id="daemon-hplip"
 name="hplip - HP Printer Backend"
 provides="hplip"
 requires="mount/system:kern-usb"
 command="/sbin/start-stop-daemon --start --quiet --exec /usr/sbin/hpiod; /usr/share/hplip/hpssd.py -x"
 restart="yes" />
I haven't found a way to start hpiod without forking - there's no man page, and no --help output. I posted to the HPLIP-Help list, but it's been a couple of weeks now without any answer. The '-x' will prevent hpssd.py from backgrounding though, so that part should be OK. Coincidentally, after writing this I was looking for the 'before/after' behavior that you happen to have added in this latest release :D


what does the hpiod daemon do? i made this module for a friend of mine and he said it worked so im just curious what it does, i was just waiting for magnus to finish up some override/start_before code before committing this module, Aslo, i dug around the man pages also and couldnt find anything better than the "-x" option

<daemon id="daemon-hplip"
name="HP Linux Imaging and Printing System"
provides="hplip"
command="python /usr/share/hplip/hpssd.py -x"
restart="yes" />
_________________
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: Mon Jan 01, 2007 5:24 pm    Post subject: Reply with quote

rmh3093 wrote:

what does the hpiod daemon do? i made this module for a friend of mine and he said it worked so im just curious what it does, i was just waiting for magnus to finish up some override/start_before code before committing this module, Aslo, i dug around the man pages also and couldnt find anything better than the "-x" option

<daemon id="daemon-hplip"
name="HP Linux Imaging and Printing System"
provides="hplip"
command="python /usr/share/hplip/hpssd.py -x"
restart="yes" />

I'm honestly not certain what hpiod does (hp i/o daemon??? maybe it's for the scanner portion?) Does your friend use the scanner on his printer? I just put it in there 'cause the sysv script called it. It may not be necessary, though, as hpssd.py starts fine without it and doesn't call it on its own. When I get my printer back (lent it out) I'll try both modules and see what happens.

EDIT: I just finished updating & modifying my configs, and running einit --check-configuration returns this:
Code:
eINIT 0.15.0-svn-513: Initialising: Linux
 >> parsing "/etc/einit/einit.xml".
 >> parsing "/etc/einit/local.xml".
Segmentation fault
Any thoughts?

Oh, before I forget again - how close are we to having visual-edje functional? I can't wait to see it!
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


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

PostPosted: Mon Jan 01, 2007 5:52 pm    Post subject: Reply with quote

UberPinguin wrote:
rmh3093 wrote:

what does the hpiod daemon do? i made this module for a friend of mine and he said it worked so im just curious what it does, i was just waiting for magnus to finish up some override/start_before code before committing this module, Aslo, i dug around the man pages also and couldnt find anything better than the "-x" option

<daemon id="daemon-hplip"
name="HP Linux Imaging and Printing System"
provides="hplip"
command="python /usr/share/hplip/hpssd.py -x"
restart="yes" />

I'm honestly not certain what hpiod does (hp i/o daemon??? maybe it's for the scanner portion?) Does your friend use the scanner on his printer? I just put it in there 'cause the sysv script called it. It may not be necessary, though, as hpssd.py starts fine without it and doesn't call it on its own. When I get my printer back (lent it out) I'll try both modules and see what happens.

EDIT: I just finished updating & modifying my configs, and running einit --check-configuration returns this:
Code:
eINIT 0.15.0-svn-513: Initialising: Linux
 >> parsing "/etc/einit/einit.xml".
 >> parsing "/etc/einit/local.xml".
Segmentation fault
Any thoughts?

Oh, before I forget again - how close are we to having visual-edje functional? I can't wait to see it!


that is probably a good guess, no i dont think his computer has a scanner.... However, since there are two daemons I think it would be best to to make them 2 modules instead of one.....

hmmm segfault? version 0.15? what version of gcc are you using?
_________________
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: Mon Jan 01, 2007 6:00 pm    Post subject: Reply with quote

i just figured out what that segfault was, it's only in the current svn (0.15) and it's in the gentoo compatibility module, i'm uploading a fix as i write this...

there's another bug i'm still working on that causes lockups when exiting einit... :/

edje's still going to take a while, i'm supposed to get gentoo compatibility first ;)

the thing about kern-usb being loaded too late is due to that module's dependencies. you could add before-mount="modprobe usbcore" to the line that mounts the usb directory (it's not before-mount="kern-usb", that would be a service, in the *-{u}mount="" attributes you're supposed to write actual shell commands to pass to /bin/sh ;) )
_________________
"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: Mon Jan 01, 2007 6:17 pm    Post subject: Reply with quote

rmh3093 wrote:
that is probably a good guess, no i dont think his computer has a scanner.... However, since there are two daemons I think it would be best to to make them 2 modules instead of one.....

That's probably a good idea; I just wish there was a way to keep hpiod from forking :(.
mdeininger wrote:
i just figured out what that segfault was, it's only in the current svn (0.15) and it's in the gentoo compatibility module, i'm uploading a fix as i write this...

there's another bug i'm still working on that causes lockups when exiting einit... :/

edje's still going to take a while, i'm supposed to get gentoo compatibility first ;)

the thing about kern-usb being loaded too late is due to that module's dependencies. you could add before-mount="modprobe usbcore" to the line that mounts the usb directory (it's not before-mount="kern-usb", that would be a service, in the *-{u}mount="" attributes you're supposed to write actual shell commands to pass to /bin/sh ;) )

Hm. I'm not sure what dependencies shell-kern-usb is waiting for, though. It lists 'mount/system,' but that's done well before default is reached. I'm kind of wary of rebooting to test until this segfault is cleared up though :?
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


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

PostPosted: Mon Jan 01, 2007 6:25 pm    Post subject: Reply with quote

UberPinguin wrote:
rmh3093 wrote:
that is probably a good guess, no i dont think his computer has a scanner.... However, since there are two daemons I think it would be best to to make them 2 modules instead of one.....

That's probably a good idea; I just wish there was a way to keep hpiod from forking :(.
mdeininger wrote:
i just figured out what that segfault was, it's only in the current svn (0.15) and it's in the gentoo compatibility module, i'm uploading a fix as i write this...

there's another bug i'm still working on that causes lockups when exiting einit... :/

edje's still going to take a while, i'm supposed to get gentoo compatibility first ;)

the thing about kern-usb being loaded too late is due to that module's dependencies. you could add before-mount="modprobe usbcore" to the line that mounts the usb directory (it's not before-mount="kern-usb", that would be a service, in the *-{u}mount="" attributes you're supposed to write actual shell commands to pass to /bin/sh ;) )

Hm. I'm not sure what dependencies shell-kern-usb is waiting for, though. It lists 'mount/system,' but that's done well before default is reached. I'm kind of wary of rebooting to test until this segfault is cleared up though :?


im committed the hplip modules (hpiod+hpssd.py), its ok if hpiod forks, it just needs to be written as a shell-module instead of a daemon. i created a "printing" serivice group with hpiod,hpssd, and cupsd so if you add "printing" to your mode it will load those three modues (unless you tweak it)..... as far as the usb issue, I think I had that same issue when i had my usb drivers compiled as modules, try adding "options="critical" to what ever fstab entry your modules are sitting on to make sure einit can actually find the module before it trys to load it
_________________
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: Mon Jan 01, 2007 6:28 pm    Post subject: Reply with quote

rmh3093 wrote:
im committed the hplip modules (hpiod+hpssd.py), its ok if hpiod forks, it just needs to be written as a shell-module instead of a daemon. i created a "printing" serivice group with hpiod,hpssd, and cupsd so if you add "printing" to your mode it will load those three modues (unless you tweak it)..... as far as the usb issue, I think I had that same issue when i had my usb drivers compiled as modules, try adding "options="critical" to what ever fstab entry your modules are sitting on to make sure einit can actually find the module before it trys to load it

I actually just finished updating and saw those modules - thanks! As far as the usb-modules thing, It's not a problem for me as I've monolithized (word, even?) the usbcore; everything else is working fine. I'm about to reboot to give it a test.

EDIT: Is there a way to capture some sort of log from einit? The output on tty10/11 scrolls by too fast & there's a couple of spots where things are hanging longer than usual.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


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

PostPosted: Mon Jan 01, 2007 9:03 pm    Post subject: Reply with quote

UberPinguin wrote:
rmh3093 wrote:
im committed the hplip modules (hpiod+hpssd.py), its ok if hpiod forks, it just needs to be written as a shell-module instead of a daemon. i created a "printing" serivice group with hpiod,hpssd, and cupsd so if you add "printing" to your mode it will load those three modues (unless you tweak it)..... as far as the usb issue, I think I had that same issue when i had my usb drivers compiled as modules, try adding "options="critical" to what ever fstab entry your modules are sitting on to make sure einit can actually find the module before it trys to load it

I actually just finished updating and saw those modules - thanks! As far as the usb-modules thing, It's not a problem for me as I've monolithized (word, even?) the usbcore; everything else is working fine. I'm about to reboot to give it a test.

EDIT: Is there a way to capture some sort of log from einit? The output on tty10/11 scrolls by too fast & there's a couple of spots where things are hanging longer than usual.


yeah i also have wanted a logging feature, i have just been to lazy to figure out how to pipe the output to a log or something equivalent
_________________
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: Mon Jan 01, 2007 10:11 pm    Post subject: Reply with quote

alright, sorry for taking so long, but i got the weirdest issue right now -- einit segfaults when trying to find a shutdown/reboot function, but only when run in sandbox mode on amd64 and not against valgrind... this shouldn't interfere with normal behaviour, but it's definitely weird...
i fixed most of the other problems related to shutting down, though, so -svn-516 should be a good idea nonetheless.

for logging you could modify this variable in einit.xml:
Code:

    <std-io stdin="/dev/tty1" stdout="/dev/tty1" stderr="/dev/tty11" console="/dev/tty12" activate-vt="1" kernel-vt="12" verbose-output="/dev/tty10" />


what you're probably interested in is the value of the stderr="" attribute -- just point it to something like /einit-stderr and all the output that would be passed to that console goes right into that file.

there's two gotchas, though: a) the file needs to exist at boot-time (i.e., before rebooting just # touch it) and you will obviously need to mount your root-filesystem rw to catch that output (i.e. add "rw" to the kernel options).

i'm back to tracing this weird problem on amd64.

btw: could someone test the new initctl module? just add "initctl" to some of your services with the latest SVN. if it works the way i hope it does, then you should be able to use sysv's "shutdown" and "reboot" commands...
_________________
"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: Tue Jan 02, 2007 1:28 am    Post subject: Reply with quote

mdeininger wrote:

for logging you could modify this variable in einit.xml:
Code:

    <std-io stdin="/dev/tty1" stdout="/dev/tty1" stderr="/dev/tty11" console="/dev/tty12" activate-vt="1" kernel-vt="12" verbose-output="/dev/tty10" />


what you're probably interested in is the value of the stderr="" attribute -- just point it to something like /einit-stderr and all the output that would be passed to that console goes right into that file.

there's two gotchas, though: a) the file needs to exist at boot-time (i.e., before rebooting just # touch it) and you will obviously need to mount your root-filesystem rw to catch that output (i.e. add "rw" to the kernel options).

Tried changing stderr= to point to /var/log/einit.log, touched the file, added 'rw' to the mount options for /. Nothing is coming up on tty11 (good) but /var/log/einit.log is empty (bad). However, the specific issue I wanted the logs for seems to have cleared itself up - boot is now just as fluid as before :? 8)
Still trying to figure out why shell-kern-usb and shell-kern-audio-alsa take so long to load - they're loading long after their dependency (mount/system) should be satisfied.

Also, does anyone know if plugging in an ethernet cable causes an event that udev can catch? I'd like to make a udev rule to start net-eth0 when a cable is plugged in instead of trying to load it all the time. 8)
Back to top
View user's profile Send private message
zxy
Veteran
Veteran


Joined: 06 Jan 2006
Posts: 1160
Location: in bed in front of the computer

PostPosted: Tue Jan 02, 2007 2:01 am    Post subject: Reply with quote

mdeininger wrote:
...
...
btw: vapier added an ebuild for einit 0.14 to the main portage tree :)
go vapier! ;)


I don't see it in main portage tree and I just synced. (I use ~arch) :?

How long until we can use the portage one.

--- EDIT ---

Sorry. It's in. :D :D :D :D
_________________
Nature does not hurry, yet everything is accomplished.
Lao Tzu
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: Tue Jan 02, 2007 4:56 am    Post subject: Reply with quote

mdeininger wrote:
btw: could someone test the new initctl module? just add "initctl" to some of your services with the latest SVN. if it works the way i hope it does, then you should be able to use sysv's "shutdown" and "reboot" commands...


Just tried it out. initctl starts OK, and using the 'reset' button from Entrance seems to kick things off properly - einit switches to power-reset and shuts down everything. However, it hangs instead of rebooting or shutting down. No abnormal output on tty12 or tty11. HTH!
BTW, /dev /sys /proc and /. are still not unmounting as of 0.15.0-svn-516.
Code:
<node mountpoint="/" device="/dev/hda5" fs="ext3" options="rw" />
<node mountpoint="/dev" fs="tmpfs" after-mount="/sbin/udevstart" manager="/sbin/udevd" />
<node mountpoint="/sys" fs="sysfs" />
<node mountpoint="/proc" fs="proc" />
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 02, 2007 11:47 am    Post subject: Reply with quote

just tried it myself... weirdness, it works fine from entrance, but not with the console commands (tested shutdown and halt...)

i'm finally experiencing the umount problem! yaaay :D
using the suggested <after-switch /> lines from einit.xml seems to work around the problem, though (commenting the others and uncommenting the commented one, i.e. running /etc/init.d/halt.sh. they're still not reported as unmounted, but they're unmounted after the switch)
_________________
"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: Wed Jan 03, 2007 6:16 pm    Post subject: Reply with quote

Back a while ago I started a discussion about an easier way to manage all of the shell/daemon modules. I had proposed that every module be broken out into a separate file and then use a script to enable/disable certain modules. Back when i started that discussion I also created a first attempt at a script which could what I was talking about. Based on that same concept here is an eselect module which does the same thing. This works better than the last script does... Please try it and let me know what you think. To use it you must have your modules all broken out.

To prepare your /etc/einit directory do this:
Code:
cd /tmp
wget http://www.rit.edu/~rmh3093/einit_configs_newlayout.tar.bz2
tar xvjf einit_configs_newlayout.tar.bz2
cp -r modules /etc/einit
mkdir /etc/einit/modules/_used
mkdir /etc/einit/modules/{daemon,shell}


You also need to tweak /etc/einit/einit.xml. Add the lines below the the include section:
Code:
<directory s="modules/_used/daemon" />
<directory s="modules/_used/shell" />


Code:
# eselect einit           
Usage: eselect einit <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  disable <type> <module>   (no description)
    type                      Module type (either 'shell' or 'daemon')
    module                    Module name or number (from 'list' action)
  enable <type> <module>    Disable a module
    type                      Module type (either 'shell' or 'daemon')
    module                    Module name or number (from 'list' action)
  list <type>               List available modules
    type                      Module type (either 'shell' or 'daemon')


Code:
# eselect einit list daemon
Available daemon modules:
  [1]   acpi.xml *
  [2]   apmd.xml
  [3]   atieventsd.xml
  [4]   avahi-daemon.xml *
  [5]   avahi-dnsconfd.xml *
  [6]   bluez-hcid.xml
  [7]   bluez-hidd.xml
  [8]   bluez-sdpd.xml
  [9]   cupsd.xml
  [10]  dhcdbd.xml
  [11]  entrance.xml
  [12]  fcron.xml
  [13]  gdm.xml
  [14]  gpm.xml
  [15]  hald.xml
  [16]  hellanzb.xml
  [17]  ivman.xml
  [18]  kdm.xml *
  [19]  lighttpd.xml
  [20]  metalog.xml
  [21]  mpd.xml
  [22]  mysqld.xml
  [23]  networkmanager.xml
  [24]  nmbd.xml
  [25]  ntpd.xml
  [26]  openntpd.xml
  [27]  portmap.xml
  [28]  privoxy.xml
  [29]  smbd.xml *
  [30]  sshd.xml *
  [31]  syslog-ng.xml
  [32]  tor.xml
  [33]  tts-festival.xml
  [34]  vixie-cron.xml
  [35]  xcompmgr.xml
  [36]  xdm.xml
  [37]  xorg.xml


/usr/share/eselect/modules/einit.eselect:
DESCRIPTION="Enable/Disable eInit shell/daemon modules"
MAINTAINER="rmh3093@gmail.com"

# find a list of modules
find_modules() {
   modules=`ls ${ROOT}/etc/einit/modules/${1}`
        for module in $modules ; do
                [[ -f ${ROOT}/etc/einit/modules/${1}/${module} ]] && echo $(basename ${module} )
        done

}

# disable module by removing the symlink in the _used folder
remove_symlink() {
        module=${2}
        if is_number "${module}" ; then
                modules=( $(find_modules ${1}) )
                module=${modules[$(( ${module} - 1 ))]}
        fi
        if [[ -z ${module} ]] ; then
                die -q "Module \"${2}\" doesn't appear to be valid!"
        elif [[ -f "${ROOT}/etc/einit/modules/${1}/${module}" ]] ; then
           rm "${ROOT}/etc/einit/modules/_used/${1}/${module}"
        else
                die -q "Module \"${2}\" doesn't appear to be valid!"
   fi
}

# enable module by creating a symlink in the _used folder
set_symlink() {
        module=${2}
        if is_number "${module}" ; then
                modules=( $(find_modules ${1}) )
                module=${modules[$(( ${module} - 1 ))]}
        fi
        if [[ -z ${module} ]] ; then
                die -q "Module \"${2}\" doesn't appear to be valid!"
        elif [[ -f "${ROOT}/etc/einit/modules/${1}/${module}" ]] ; then
                ln -s "${ROOT}/etc/einit/modules/${1}/${module}" "${ROOT}/etc/einit/modules/_used/${1}/${module}"
        else
                die -q "Module \"${2}\" doesn't appear to be valid!"
        fi
}

### list action ###
describe_list() {
   echo "List available modules"
}

describe_list_parameters() {
        echo "<type>"
}

describe_list_options() {
        echo "type : Module type (either 'shell' or 'daemon')"
}

do_list() {
        if [[ -z ${1} ]] ; then
                # no parameter
                die -q "You didn't tell me what type of module to list"
   else
           modules=( $(find_modules ${1} ) )
      write_list_start "Available ${1} modules:"
           if [[ -n ${modules[@]} ]] ; then
                   local i
                   for (( i = 0 ; i < ${#modules[@]} ; i = i + 1 )) ; do
                           [[ -L ${ROOT}/etc/einit/modules/_used/${1}/${modules[${i}]} ]] && \
                                   modules[${i}]="${modules[${i}]} $(highlight '*' )"
                   done
                   write_numbered_list "${modules[@]}"
           else
                   write_kv_list_entry "(none found)" ""
           fi
   fi
}

### enable action ###
describe_enable() {
        echo "Enable a module"
}

describe_enable_parameters() {
        echo "<type> <module>"
}

describe_enable_options() {
        echo "type : Module type (either 'shell' or 'daemon')"
        echo "module : Module name or number (from 'list' action)"
}

do_enable() {
        if [[ -z ${1} ]] ; then
                # no parameter
                die -q "You didn't tell me what type of module to enable"

        elif [[ -z ${2} ]] ; then
                # no parameter
                die -q "You didn't tell me what module to enable"

        elif [[ -L "${ROOT}/etc/einit/modules/_used/${1}/${2}" ]] ; then
                # existing symlink
                if ! remove_symlink "${1} ${2}" ; then
                        die -q "Couldn't remove existing symlink"
                elif ! set_symlink "${1} ${2}" ; then
                        die -q "Couldn't set a new symlink"
                fi

        elif [[ -e "${ROOT}/etc/einit/modules/_used/${1}/${2}" ]] ; then
                # we have something strange
                die -q "Sorry, ${ROOT}/etc/einit/modules/_used/${1}/${2} confuses me"

        else
                set_symlink "${1}" "${2}" || die -q "Couldn't set a new symlink"
        fi
}

### disable action ###
describe_enable() {
        echo "Disable a module"
}

describe_disable_parameters() {
        echo "<type> <module>"
}

describe_disable_options() {
        echo "type : Module type (either 'shell' or 'daemon')"
        echo "module : Module name or number (from 'list' action)"
}

do_disable() {
        if [[ -z ${1} ]] ; then
                # no parameter
                die -q "You didn't tell me what type of module to disable"

        elif [[ -z ${2} ]] ; then
                # no parameter
                die -q "You didn't tell me what module to disable"
   else
                remove_symlink "${1}" "${2}" || die -q "Couldn't disable module"
        fi
}

# vim: set ft=eselect :

_________________
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: Wed Jan 03, 2007 6:23 pm    Post subject: Reply with quote

Well done, Ryan!

I've seen you doing some things with eselect in the SVN repository and started wondering what you were up to... I think I like that idea now :)
If you need anything in-core for your ideas, don't heistate to ask for it and I'll go get it in ;)
_________________
"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: Wed Jan 03, 2007 7:51 pm    Post subject: Reply with quote

mdeininger wrote:
Well done, Ryan!

I've seen you doing some things with eselect in the SVN repository and started wondering what you were up to... I think I like that idea now :)
If you need anything in-core for your ideas, don't heistate to ask for it and I'll go get it in ;)


FYI: the eselect-einit modules i just posted in this forum is different that the eselect-init ebuild I already posted in the repo... eselect-init is just for switching the default init system....

...eselect-einit is going to be fore manipulating the einit config file(s)


I hope to add dependency checks (so that if you enable module X is also enables anything it might require), i was also planning on adding support to add and remove modules from a particular mode
_________________
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: Wed Jan 03, 2007 7:57 pm    Post subject: Reply with quote

ah, been too quick at reading then... eselect-init sounds as useful, though, but i noticed the digest seems to be invalid... probably going to correct that later :)

might be possible to misuse einit's core to give you that dependency information via the --ipc-command flag to einit.
manipulating the mode's information is a good idea -- i've added some code that can parse gentoo's /etc/runlevels and thus noticed how nice rc-update really is, and a native version would definitely beat that ;)
_________________
"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: Wed Jan 03, 2007 8:28 pm    Post subject: Reply with quote

mdeininger wrote:
ah, been too quick at reading then... eselect-init sounds as useful, though, but i noticed the digest seems to be invalid... probably going to correct that later :)

might be possible to misuse einit's core to give you that dependency information via the --ipc-command flag to einit.
manipulating the mode's information is a good idea -- i've added some code that can parse gentoo's /etc/runlevels and thus noticed how nice rc-update really is, and a native version would definitely beat that ;)


doesnt einit need to be running for 'einit --ipc-command' to work? for that to be useful I will need to be able to work even when the system was booted with a different init system
_________________
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: Wed Jan 03, 2007 8:35 pm    Post subject: Reply with quote

rmh3093 wrote:
mdeininger wrote:
ah, been too quick at reading then... eselect-init sounds as useful, though, but i noticed the digest seems to be invalid... probably going to correct that later :)

might be possible to misuse einit's core to give you that dependency information via the --ipc-command flag to einit.
manipulating the mode's information is a good idea -- i've added some code that can parse gentoo's /etc/runlevels and thus noticed how nice rc-update really is, and a native version would definitely beat that ;)


doesnt einit need to be running for 'einit --ipc-command' to work? for that to be useful I will need to be able to work even when the system was booted with a different init system
no, not quite.

einit --ipc-command "your command here" will run einit, initialise all modules (initialise, not enable ;) ) and then instead of switching modes, it will only process that ipc-command and then exit. for example "einit (--wtf|--check-configuration)" is actually the same as calling einit --ipc-command "examine configuration".

if you'd like to "misuse" einit's core for those dependency calculations, i'll add an ipc command for that purpose -- just give me some sample output that'll be easy to parse in your script and off i go ;)
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

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


Joined: 06 Jan 2006
Posts: 1160
Location: in bed in front of the computer

PostPosted: Thu Jan 04, 2007 2:48 am    Post subject: Reply with quote

I'm getting an error that I think I had once before, when installing einit from portage on pentium2
Code:
>>> Starting src_unpack
>>> Unpacking einit-0.14.0.500.tar.bz2 to /var/tmp/paludis/sys-apps/einit-0.14.0.500/work
tar jxf /usr/portage/distfiles/einit-0.14.0.500.tar.bz2 --no-same-owner
>>> Done src_unpack
>>> Starting src_compile
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-linux --use-posix-regex --prefix=/ --build=i686-pc-linux-gnu
configuring eINIT-499...
checking options [ PREFIX HOST LINUX REGEX PREFIX ]
: command not foundurcing/etc/make.conf: line 3:
: command not founde 9:
: command not founde 12:
: command not founde 17:
: command not founde 20:
: command not founde 23:
: command not founde 26:
: command not founde 29:
: command not founde 40:
: command not founde 42:
: command not founde 45:
 ]
checking system type...  i686-pc-linux-gnu
checking target system type...  i686-pc-linux-gnu
checking for a compiler... got one! (/usr/lib/ccache/bin/gcc)
finding absolute include directory...
searching for expat.h...
checking system type... Linux
creating config.mk...
creating module-configuration.c
creating dependency information... done
make
cd src && make all
make[1]: Entering directory `/var/tmp/paludis/sys-apps/einit-0.14.0.500/work/einit-0.14.0.500/src'
/usr/lib/ccache/bin/gcc -DBUILDNUMBER="\"499\"" -DISSVN=0 -I/var/tmp/paludis/sys-apps/einit-0.14.0.500/work/einit-0.14.0.500/src/include -O2 -march=pentium2 -fo -DPOSIXREGEX -DPOSIX -DLINUX -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=both -c einit.c
: No such file or directory
make[1]: *** [einit.o] Error 1
make[1]: Leaving directory `/var/tmp/paludis/sys-apps/einit-0.14.0.500/work/einit-0.14.0.500/src'
make: *** [all] Error 2

!!! ERROR in sys-apps/einit-0.14.0.500:
!!! In src_compile at line 32
!!! (no message provided)

!!! Call stack:
!!!    * src_compile (/usr/src/portage/sys-apps/einit/einit-0.14.0.500.ebuild:32)
!!!    * ebuild_f_compile (/usr/libexec/paludis/src_compile.bash:44)
!!!    * ebuild_main (/usr/libexec/paludis/ebuild.bash:321)
!!!    * main (/usr/libexec/paludis/ebuild.bash:333)

die trap: exiting with error.

Install error:
  * In program paludis -i einit:
  * When performing install action from command line:
  * When executing install task:
  * Install error: Install failed for 'sys-apps/einit-0.14.0.500::gentoo'



9999 version from svn installed ok a few days ago.
_________________
Nature does not hurry, yet everything is accomplished.
Lao Tzu
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 Jan 04, 2007 10:34 am    Post subject: Reply with quote

i think the ebuild in portage is missing the --ebuild flag to ./configure... :-/
using the 0.14.* ebuilds from the overlay should work...
_________________
"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 Jan 04, 2007 4:17 pm    Post subject: Reply with quote

guys, i'm trying to get gentoo init.d scripts supported just now, and i think i made quite some progress... but i could use someone to build a database with aliases of gentoo service names <> einit service names :)

i've added aliasing support earlier and now i've also added (very basic) gentoo init.d script support to the latest version (539 right now). if anyone felt like trying this, just uncomment the <gentoo><init.d> line in local.xml and run
Code:
# einit --ipc-command "list modules"


that'll list all modules with their required and provided services, then playing a little mix'n'match and adding alias nodes (see example in local.xml) that map gentoo services to einit services would help me a great deal ;)

WARNING: don't forget to comment the <init.d /> line back out when you're done!

anyone wishing initng .ii file support? just raise your hands :D

btw, importing runlevels from gentoo seems to work rather nice as well, just need to uncomment that and (again) add aliases :)
_________________
"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: Thu Jan 04, 2007 5:13 pm    Post subject: Reply with quote

mdeininger wrote:
guys, i'm trying to get gentoo init.d scripts supported just now, and i think i made quite some progress... but i could use someone to build a database with aliases of gentoo service names <> einit service names :)

i've added aliasing support earlier and now i've also added (very basic) gentoo init.d script support to the latest version (539 right now). if anyone felt like trying this, just uncomment the <gentoo><init.d> line in local.xml and run
Code:
# einit --ipc-command "list modules"


that'll list all modules with their required and provided services, then playing a little mix'n'match and adding alias nodes (see example in local.xml) that map gentoo services to einit services would help me a great deal ;)

WARNING: don't forget to comment the <init.d /> line back out when you're done!

anyone wishing initng .ii file support? just raise your hands :D

btw, importing runlevels from gentoo seems to work rather nice as well, just need to uncomment that and (again) add aliases :)


Code:
eINIT 0.15.0-svn-521: Initialising: Linux
 >> parsing "/etc/einit/einit.xml".
 >> parsing "/etc/einit/local.xml".
/dev/sda3: ReiserFS superblock found, but blockdevice not large enough (612464*4096): invalid superblock or raw RAID device
/dev/sda4: ReiserFS superblock found, but blockdevice not large enough (25001152*4096): invalid superblock or raw RAID device
 >> gentoo system detected
 >> global configuration update, checking files
NOTICE: CV "configuration-compatibility-sysv-distribution-gentoo-init.d/path":
  Not found: Gentoo Init Scripts will not be processed. (not a problem)
NOTICE: CV "configuration-compatibility-sysv-init.d/path":
  Not found: Regular Init Scripts will not be processed. (not a problem)
NOTICE: configuration variable "services-external" not found. (not a problem)
Segmentation fault

_________________
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 Jan 04, 2007 5:27 pm    Post subject: Reply with quote

it should say:
Code:
eINIT 0.15.0-svn-539: Initialising: Linux

-521 had some embarassaing stability issues, i apologise for that, but i think i fixed them in -539 :)

and, that output reads that the variable is still commented?
it's also
Code:
einit --ipc-command "list modules"
, which should generate output like
Code:
helios mdeininger # einit --ipc-command "list modules"
eINIT 0.15.0-svn-539: Initialising: Linux
 >> parsing "/etc/einit/einit.xml".
 >> parsing "/etc/einit/local.xml".
 >> gentoo system detected
[I] compatibility-sysv-initctl (System-V Compatibility: initctl)
 > provides: initctl
 > requires: mount/system
[I] compatibility-mod-sysv-init-d (System-V Compatibility: init.d Pseudo-Module Support)
[I] compatibility-sysv-utmp (System-V Compatibility: {U|W}TMP)
 > provides: utmp
 > requires: mount/critical
[I] einit-external (External Services)
[I] linux-process (eINIT Process Function Library (Linux-Specific Parts))
[I] linux-network-experimental (Network Configuration (Linux-specific Parts))
 > provides: linux-network
[I] linux-mount (Linux-specific Filesystem-Mounter Functions)
 > provides: mount
[I] linux-sysconf (Linux-specific System-Configuration)
 > provides: sysconf
[I] compatibility-sysv-gentoo (System-V Compatibility: Gentoo Support)
[I] einit-exec (pexec/dexec library module)
[I] einit-network-experimental (Network Configuration)
 > provides: network/experimental
 > requires: mount/critical
[I] einit-process (eINIT Process Function Library)
[I] einit-mount-critical (mount (critical))
 > provides: mount/critical
 > requires: / mount/system
[I] einit-mount-system (mount (system))
 > provides: mount/system
 > requires: /
[I] einit-mount-remote (mount (remote))
 > provides: mount/remote
 > requires: / mount/system network portmap
[... snip ...]

_________________
"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 2 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