You are not logged in.

#1 2005-02-17 01:38:38

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

[extra]: ivman

ivman is a very usefull tool. it was posted to the forum first here:

http://bbs.archlinux.org/viewtopic.php?t=9828

i included it to extra. with the following changes:

the config files are installed in a way that the user needs to modify them and move them to the correct place first. they are in the package in this way:

etc/ivman/IvmConfigActions.xml.default
etc/ivman/IvmConfigBase.xml.default
etc/ivman/IvmConfigMappings.xml.default
etc/ivman/IvmConfigProperties.xml.default

and after checking them and editing them, you should save them to

etc/ivman/IvmConfigActions.xml
etc/ivman/IvmConfigBase.xml
etc/ivman/IvmConfigMappings.xml
etc/ivman/IvmConfigProperties.xml

also note: to run ivman daemon, you must first have running dbus and hal daemons!


The impossible missions are the only ones which succeed.

Offline

#2 2005-02-17 17:33:16

thegnu
Member
From: Brooklyn, NY
Registered: 2004-05-04
Posts: 280
Website

Re: [extra]: ivman

dp wrote:

ivman is a very usefull tool.
i included it to extra. with the following changes:

Cool, thanks!  I was wondering why it hadn't gotten packaged yet.  About having to run dbus/hal before it works, can't you just have the daemon script check to see if they're running, and start them?  Or is that un-Archy for some reason?

Oh, also, everyone remember to write up any configurations you do at the ivman wiki.  It really could use some beefing up. smile


fffft!

Offline

#3 2005-02-17 19:25:00

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: [extra]: ivman

Cool, thanks! I was wondering why it hadn't gotten packaged yet. About having to run dbus/hal before it works, can't you just have the daemon script check to see if they're running, and start them? Or is that un-Archy for some reason?

the check is already done.

Offline

#4 2005-02-17 19:57:15

thegnu
Member
From: Brooklyn, NY
Registered: 2004-05-04
Posts: 280
Website

Re: [extra]: ivman

Pajaro wrote:

the check is already done.

But it doesn't start them, though, right?

#!/bin/bash

# general config
. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /usr/bin/ivman`
case "$1" in
    start)
        stat_busy "Starting ivman Device Manager"
        if [ -z "$PID" ]; then
            if [ ! -f /etc/ivman/IvmConfigBase.xml ]; then
                echo "ERROR: Make sure '/etc/ivman/IvmConfigBase.xml' exists"
                stat_fail
                exit 1
            fi
            /usr/bin/ivman
        fi
        if [ ! -f /var/run/daemons/hal ]; then
             stat_fail
             echo "ERROR: 'hal' is not running"
             if [ ! -f /var/run/daemons/dbus ]; then
                echo "NOTE: 'hal' needs 'dbus' to be running - you need to start both!"
             fi
             exit 1
        fi
        if [ ! -z "$PID" -o $? -gt 0 ]; then
            stat_fail
        else
            add_daemon ivman
            stat_done
        fi
        ;;
    stop)
        stat_busy "Stopping ivman Device Manager"
            [ ! -z "$PID" ] && kill $PID &> /dev/null
        if [ $? -gt 0 ]; then
            stat_fail
        else
            rm_daemon ivman
            stat_done
        fi
        ;;
    restart)
        $0 stop
        sleep 1
        $0 start
        ;;
    *)
        echo "usage: $0 {start|stop|restart}"
        ;;
esac
exit 0

It just fails.  What I was suggesting was that ivman could start the required daemons.  I don't know if this is a good idea.


fffft!

Offline

#5 2005-02-17 21:41:37

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: [extra]: ivman

thegnu wrote:

It just fails.  What I was suggesting was that ivman could start the required daemons.  I don't know if this is a good idea.

yes ... in the original version, i had it automagically running hal, but then i realized that hal needs dbus to be running ... besides hal not being my pkg i think that this would do too much automagic wizzardy (ivman checking for hal and dbus and starting them) ... and adding dbus hal and ivman in DAEMONS is really not a big deal

is there a _good_ reason why magic should be used in this rc.d script? (note_to_myself: lazyness is not a good reason)


The impossible missions are the only ones which succeed.

Offline

#6 2005-02-17 22:37:41

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [extra]: ivman

Not a big deal, but shouldn't you send output to /dev/null while starting ivman? It shows the 'Ikke's Volume Manager, http://ivman.sf.net' line while starting, it doesn't correspond nicely with the start  of other daemons.

Offline

#7 2005-02-17 22:49:04

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: [extra]: ivman

lucke wrote:

Not a big deal, but shouldn't you send output to /dev/null while starting ivman? It shows the 'Ikke's Volume Manager, http://ivman.sf.net' line while starting, it doesn't correspond nicely with the start  of other daemons.

it's easier to find trouble, if you let the daemon output things to the console while starting

however i realise that this info-line is not "nice"

is there a option to pass to ivman to be quiet?


The impossible missions are the only ones which succeed.

Offline

#8 2005-02-17 23:04:26

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: [extra]: ivman

dp wrote:

it's easier to find trouble, if you let the daemon output things to the console while starting

however i realise that this info-line is not "nice"

is there a option to pass to ivman to be quiet?

If you want to remove that line start ivman with:
/usr/bin/ivman | grep -v "'Ikke's Volume Manager"

Generally, you can do:
/usr/bin/ivman &2>1 >/dev/null # I hope I got it well... worked in a tiny test
(redirects error messages to output also && output=/dev/null)

Offline

#9 2005-02-21 14:27:12

thegnu
Member
From: Brooklyn, NY
Registered: 2004-05-04
Posts: 280
Website

Re: [extra]: ivman

dp wrote:

is there a _good_ reason why magic should be used in this rc.d script? (note_to_myself: lazyness is not a good reason)

Hmm... I thought I posted a reply.  Maybe I got deleted for being a bastard.  It's a constant battle with my personality. roll

Anyway.  I think that if there's no possible way that ivman can run without hal and dbus, there isn't a reason not to check for them.  It's like a dependency without which you can compile and install a program, but it won't run.  It just makes sense to me to run a check because it'll only be noticeable on the slowest of computers, and it's not a matter of limited functionality, it's a matter of not functioning at all without them.

So I think, why not?  On the other hand, if you're not able to figure out why ivman isn't running, then you probably won't be able to configure it.  So whatever. smile

My argument for not running the script is that then people might have stuff running they'd rather not.  But then again, if you're not able to figure out why hal and dbus are running when you run ivman, you probably won't care.


fffft!

Offline

#10 2005-02-21 15:25:50

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: [extra]: ivman

what happened to this thread?

thegnu posted a reply and i replied this one but now both are missing  :evil:

///

the rc.d script tests on hal and dbus ... but does not run them themselves (if hal would run dbus automatically i may reconsider ivman run hal automatically, but hal is not my pkg)


The impossible missions are the only ones which succeed.

Offline

#11 2005-02-21 19:31:12

thegnu
Member
From: Brooklyn, NY
Registered: 2004-05-04
Posts: 280
Website

Re: [extra]: ivman

dp wrote:

(if hal would run dbus automatically i may reconsider ivman run hal automatically, but hal is not my pkg)

Righto.  I had actually thought about that.  Good point.  And it does echo its need to run hal and dbus.


fffft!

Offline

#12 2005-02-21 21:08:12

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: [extra]: ivman

more info on ivman:

to run applications as your normal user open an instance of ivman as your normal user (add a symlink to autostart) and create your own rules in ~/.ivman

once you run ivman as normal user default config files are created in ~/.ivman. You don't need to create them.

Offline

#13 2005-02-22 09:40:01

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: [extra]: ivman

does anyone else get errors starting ivman as a user?  I actually read the manual and all the config files so i knew to do that to set rules for user as paj just added but I get errors about a lib?  I should have copied it, DAMN!

And apparently my hal.hotplug DEVPATH is wrong according to the logs?  no idea what that is all about either?  any ideas?

also, i don't understand the mapping concept - I have gone to alot of trouble to set udev up to make symlink for different devices of the same type so that they are easier to mount in fstab - as thegnu wanted to.

Now ivman is telling me that that is no good and i need the original device in fstab or that I have to map it.  The config file talks about /dev/hdc and /disc/disc0/cdrom or what ever but it is not clear from the example which is actuall the one in ftsab and which is the actually device as when you use udev /dev/hdc IS the device and the other thing is just a symlink!

I AM VERY CONFUSED!

Offline

#14 2005-02-22 14:24:20

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: [extra]: ivman

when you run ivman as a user you get some errors that come of being unable to comunicate with dbus. they are normal. it keeps doing what it has to do.

remeber that ivman has also to be run as root

Offline

Board footer

Powered by FluxBB