You are not logged in.

#1 2005-02-07 19:34:16

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

[new] ivman - great automonting tool, and more

ivman let's you decide what action to do when some hardware is detected. In example:
- if I plug an ipod moount it and open itunes
- if I plug a pendrive ,mount it and open konqueror
- if I insert a music cd open kscd
- if I plug an hp device make computer speak and say: "WARNING: HP is against Linux"
and whatever you want...

The standard configuration simply automounts remobable devices.

PKGBUILD

pkgname=ivman
pkgver=0.5_pre2
pkgrel=1
pkgdesc="Console based device manager"
url="http://ivman.sourceforge.net/"
license=""
depends=(hal libxml2)
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=(http://dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2 ivman)
md5sums=('48afd735b8611722c4846cc9ba72d543' '97175b06cb55c7150a4ca2554e5ed071')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc
  make || return 1
  make DESTDIR=$startdir/pkg install
  mkdir -p $startdir/pkg/etc/rc.d
  cp $startdir/src/ivman $startdir/pkg/etc/rc.d
  chmod +x $startdir/pkg/etc/rc.d/ivman
}

ivman

#!/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
            /usr/bin/ivman
        fi
        if [ ! -f /var/run/daemons/hal ]; then
            stat_fail
            echo "ERROR: hal is not running"
            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

Offline

#2 2005-02-07 20:33:49

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

Re: [new] ivman - great automonting tool, and more

use

./configure --prefix=/usr --sysconfdir=/etc

(check "./configure --help" for fine-tuning parameters)
(you can edit the above post and make this change)

I'll test and see how it works.

Offline

#3 2005-02-08 09:19:12

STiAT
Member
From: Vienna, Austria
Registered: 2004-12-23
Posts: 606

Re: [new] ivman - great automonting tool, and more

I can confirm that ivman is a great tool. Distributions lately tend to move to ivman instead of supermount / usbmount... and it works fine more than just fine.

// STi


Ability is nothing without opportunity.

Offline

#4 2005-02-08 10:00:44

moret
Member
From: València, Països Catalans
Registered: 2005-01-25
Posts: 26

Re: [new] ivman - great automonting tool, and more

I think the idea is great, but I don't know how to use it, please, any manual?


ArchLinux
2.6.11.7-ARCH
KDE 3.4
ADSL 512/128

Offline

#5 2005-02-08 11:56:26

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

Re: [new] ivman - great automonting tool, and more

(check "./configure --help" for fine-tuning parameters)

I did wink that's why I said it cannot be configured, not that I can't configure it. Try for yourself. If you have more luck than me, please tell, but I don't feel like patching the source for just this tiny thing.


I think the idea is great, but I don't know how to use it, please, any manual?

well, for the basic configuration (automount everything you can plug/insert) simply start the daemon.

First have a look to their documentation and learn how to manage their xml files (really simple)
http://ivman.sourceforge.net

then install hal-device-manager. With this tool you can see all the information relationed to a device that you have in your system.

If you still get lost, just tell smile

Offline

#6 2005-02-08 12:45:57

moret
Member
From: València, Països Catalans
Registered: 2005-01-25
Posts: 26

Re: [new] ivman - great automonting tool, and more

Hi, I am reading the documentation, but with my poor english... hehe, so, I think you don't use namcap. When you do a pkg, you must check his integrity with namcap doing:

namcap PKGBUILD program-vers-rel.pkg.tar.gz

You will can see the errors  big_smile

[root@localhost tmp]# namcap PKGBUILD ivman-0.5_pre2-1.pkg.tar.gz
PKGBUILD (ivman)     E: Too Many md5sums: 1 needed
PKGBUILD (ivman)     W: Missing Maintainer tag
PKGBUILD (ivman)     W: Missing CVS Id tag
PKGBUILD (ivman)     W: file referenced in $startdir outside of $startdir/src or $startdir/pkg
PKGBUILD (ivman)     W: Attempting to use specific sf.net mirror, use dl.sourceforge.net instead
ivman      E: Dependency detected and not included (libxml2) from files ['usr/lib/libIvmConfig.so', 'usr/lib/libIvmConfig.so.0.0.0', 'usr/lib/libIvmConfig.so.0', 'usr/bin/ivman']
ivman      W: Dependency included but already satisfied (dbus)

The warnings (not errors) isn't problem.

Also, in configure, in order to set the configuration directory at /etc you must type:

./configure --prefix=/usr --sysconfdir=/etc

Bye!


ArchLinux
2.6.11.7-ARCH
KDE 3.4
ADSL 512/128

Offline

#7 2005-02-08 14:24:02

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

Re: [new] ivman - great automonting tool, and more

fixed PKGBUILD. now namcap outputs this:

PKGBUILD (ivman)     W: Missing Maintainer tag
PKGBUILD (ivman)     W: Missing CVS Id tag
PKGBUILD (ivman)     W: file referenced in $startdir outside of $startdir/src or $startdir/pkg
PKGBUILD (ivman)     W: Attempting to use specific sf.net mirror, use dl.sourceforge.net instead

thanks smile

Offline

#8 2005-02-08 15:06:56

STiAT
Member
From: Vienna, Austria
Registered: 2004-12-23
Posts: 606

Re: [new] ivman - great automonting tool, and more

use dl.sourceforge.net in genral instead of using a specific mirror... that drops the last warning.

Make links to somewhere in the filesystem in the install script, and not in the PKGBUILD.

Maintainer and CVS - as long as you dont have a CVS and repo for your builds ... it's okay big_smile

// STi


Ability is nothing without opportunity.

Offline

#9 2005-02-08 17:18:07

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

Re: [new] ivman - great automonting tool, and more

1 - how are dl.sourceforge.net formated? (if you don't answer these I'll understand that it is already in the forums and I'll look for it, but now i'm late)

2 - it was not a link, it was tanking the Startdir copy of ivman. fixing PKGBUILD

3 - As me and a friend with 5 domains only consume a 0,2% of our server bandwidth and as by now i've done about 60 packages I'm thinking in creating a repo. What should I put in maintainer field? the forum nickname so that people can find me?

¿CVS? not by now.

Offline

#10 2005-02-08 17:35:01

STiAT
Member
From: Vienna, Austria
Registered: 2004-12-23
Posts: 606

Re: [new] ivman - great automonting tool, and more

- maintainer is formatted as the contributor field.
--> there's a sample PKG in /var/abs

http://dl.sourceforge.net/sourceforge/< … <filename>

I recently switched of arch, so i won't look the boards any more i guess. Good luck

// STi


Ability is nothing without opportunity.

Offline

#11 2005-02-14 23:14:33

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

Re: [new] ivman - great automonting tool, and more

ivman is snazzy, alright.  I noticed in the manpages it says invoke as root for volume management and per-user for autoplay and its ilk.  I want to unmount a volume as a user, and it says only root can do it.  I'm wondering if there's a quick fix for it.  I'm exploring the config xml, but don't know masking and all that fstab stuff very well anyway.

EDIT:  It was maybe because I ran it as root, because now that I let it load during the boot process, I can umount.


fffft!

Offline

#12 2005-02-15 08:03:30

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

Re: [new] ivman - great automonting tool, and more

you can set mount options in ivman.

I think you have to modify this lines in /etc/ivman/IvmConfigActions.xml.

    <ivm:Match name="hal.volume.fstype" value="vfat">
        <ivm:Option name="mountoption" value="umask=0007" />
        <ivm:Option name="mountoption" value="gid=100" />
    </ivm:Match>
    <ivm:Match name="hal.volume.fstype" value="ntfs">
        <ivm:Option name="mountoption" value="umask=0007" />
        <ivm:Option name="mountoption" value="gid=100" />
    </ivm:Match>
    <ivm:Match name="hal.volume.fstype" value="npfs">
        <ivm:Option name="mountoption" value="umask=0007" />
        <ivm:Option name="mountoption" value="gid=100" />
    </ivm:Match>

As I don't umount removable devices, simply unplug/eject them, I cannot give more info.

Offline

#13 2005-02-15 08:05:18

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

Re: [new] ivman - great automonting tool, and more

I also don't know if mounting permissions are in relation with the device or with the mounting itself. Try it for yourself and tell, please

Offline

#14 2005-02-15 18:12:23

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

Re: [new] ivman - great automonting tool, and more

Pajaro wrote:

I also don't know if mounting permissions are in relation with the device or with the mounting itself. Try it for yourself and tell, please

I'll doodle around with it more later.  I'm at work, so I can only configure my OS during downtime.  Is there any difference between starting a daemon as root or putting it in rc.conf and rebooting?  Because when I rebooted, I could unmount as a user.


fffft!

Offline

#15 2005-02-15 19:46:11

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

Re: [new] ivman - great automonting tool, and more

Is there any difference between starting a daemon as root or putting it in rc.conf and rebooting?

no, there's no diference

Offline

#16 2005-02-15 20:28:00

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

Re: [new] ivman - great automonting tool, and more

The ivman wiki is a bit spare.  Does anyone know if you can you have ivman identify the difference between one USB flash drive (or SATA HDD) and another, especially IDENTICAL MODELS?

Also, can ivman do things when you remove hardware?


fffft!

Offline

#17 2005-02-15 20:45:56

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

Re: [new] ivman - great automonting tool, and more

First: I think that usb_device.serial is an unique id for each usb device.

Second: yes, ivman can do things when unplugging. I think it's exec to run something when pluging, unexec to run something when unpluging.

Offline

#18 2005-02-16 20:13:28

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

Re: [new] ivman - great automonting tool, and more

Cool,
Thanks, Pajaro!


fffft!

Offline

#19 2005-02-21 05:40:02

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

Re: [new] ivman - great automonting tool, and more

that wiki made me laugh out loud!  i never laugh at stuff normally...

Offline

#20 2005-02-21 21:09:13

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

Re: [new] ivman - great automonting tool, and more

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

#21 2005-02-22 09:24:59

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

Re: [new] ivman - great automonting tool, and more

yeah - but how do you autorun it if you don't use KDE? when you log in?

Offline

#22 2005-02-22 14:25:18

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

Re: [new] ivman - great automonting tool, and more

if you use a graphical enviroment you sure can autorun.

if not, then you can add it to .bashrc

Offline

Board footer

Powered by FluxBB