You are not logged in.

#1 2012-02-09 09:44:00

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

[SOLVED]Help - PKGBUILD for vhba module (cdemu user mounting of iso's)

I've got a working PKGBUILD for vhba module, a part of the cdemu package for user mounting of iso/img's. But with the new module handling of newer kernels it's a bit cumbersome to manually adjust the script to each new kernel. Here's the code;

_kernver='3.2.5-1-ARCH'

Is there a way to automate the versioning here? Like "$variable-ARCH"?

Almost the same applies to this;

"$pkgdir/lib/modules/extramodules-3.2-ARCH/vhba.ko"

Any hints appreciated! I'm on a learning curve here.

Last edited by swanson (2012-02-10 09:33:04)

Offline

#2 2012-02-10 09:32:24

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [SOLVED]Help - PKGBUILD for vhba module (cdemu user mounting of iso's)

SOLVED:

_kernver=$(uname -r)
MOD_DIR=${_kernver:0:3}

and for install:

install -D vhba.ko "$pkgdir/lib/modules/extramodules-$MOD_DIR-ck/vhba.ko" || return 1

Now I wish I could figure out a way to extract the ending chars of uname -r, which for standard kernel is ARCH and for CK is ck. Meaning; the variable for that would be of different lengths, depending of the kernel in use; ARCH, ck,  zen and so on.

Offline

#3 2013-09-02 03:11:15

fhdrin
Member
Registered: 2012-05-10
Posts: 26

Re: [SOLVED]Help - PKGBUILD for vhba module (cdemu user mounting of iso's)

thanks for this fix.  Have I have to do this whenever I upgrade my kernel (ck) or else the vhba module doesn't load.  Does this happen to anyone else?

Offline

#4 2013-09-02 04:21:33

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [SOLVED]Help - PKGBUILD for vhba module (cdemu user mounting of iso's)

Yes, that's way it is.

Offline

Board footer

Powered by FluxBB