WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: module-init-tools  (Read 7434 times)

Offline MSumulong

  • Newbie
  • *
  • Posts: 25
module-init-tools
« on: February 25, 2014, 02:00:03 PM »
I was wondering if someone can update module-init-tools from the 4.x archive so that it can override the default busybox link in /sbin/modprobe.

I wind up having to do the following:

sudo rm /sbin/modprobe
sudo ln -s /usr/local/sbin/modprobe /sbin/modprobe

The VirtualBox Guest Additions looks for modprobe in /sbin and it uses the -c parameter which doesn't exist in the busybox version.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: module-init-tools
« Reply #1 on: February 25, 2014, 02:07:25 PM »
Try adding an alias for use by your VirtualBox Guest Additions.
alias /sbin/modprobe='/usr/local/bin/modprobe'

Offline MSumulong

  • Newbie
  • *
  • Posts: 25
Re: module-init-tools
« Reply #2 on: February 25, 2014, 04:00:07 PM »
I think it should be (bin -> sbin):

alias /sbin/modprobe='/usr/local/sbin/modprobe'

But when I run VBoxLinuxAdditions.run, it is still running the busybox version... I guess alias doesn't work within shell scripts?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: module-init-tools
« Reply #3 on: February 25, 2014, 04:20:10 PM »
That alias works only for ash, but bash does not allow a path in the alias name.
If you are using ash only, you could put the alias in ~/.ashrc.

[ -f /usr/local/sbin/modprobe ] && alias /sbin/modprobe='/usr/local/sbin/modprobe'

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: module-init-tools
« Reply #4 on: February 25, 2014, 05:08:22 PM »
Sounds very similar with a most recently reported and fixed bug:
https://www.virtualbox.org/ticket/12713

Consider submitting a respective bug report.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline MSumulong

  • Newbie
  • *
  • Posts: 25
Re: module-init-tools
« Reply #5 on: February 26, 2014, 01:36:25 PM »
That alias works only for ash, but bash does not allow a path in the alias name.
If you are using ash only, you could put the alias in ~/.ashrc.

[ -f /usr/local/sbin/modprobe ] && alias /sbin/modprobe='/usr/local/sbin/modprobe'

I've added this line to my ~/.ashrc but its still complaining:

/sbin/modprobe: invalid option -- 'c'


Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: module-init-tools
« Reply #6 on: February 26, 2014, 01:53:52 PM »
Are you sure it is not just a $PATH issue?

Are you using virtualbox-ose-additions.tcz ?

Offline MSumulong

  • Newbie
  • *
  • Posts: 25
Re: module-init-tools
« Reply #7 on: February 27, 2014, 12:41:12 PM »
I'm not sure if its a $PATH issue. I'll have to look into that.

No, I'm not using the virtualbox-ose-additions.tcz. I'm using the virtual CD that is supplied by VirtualBox and running /mnt/sr0/VBoxLinuxAdditions.run to rebuild the guest additions myself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: module-init-tools
« Reply #8 on: February 27, 2014, 12:53:55 PM »
Please post output of:
Code: [Select]
type modprobe
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline MSumulong

  • Newbie
  • *
  • Posts: 25
Re: module-init-tools
« Reply #9 on: February 27, 2014, 01:18:58 PM »
Please post output of:
Code: [Select]
type modprobe

At what point? After installing module-init-tools from 4.x and before adding [ -f /usr/local/sbin/modprobe ] && alias /sbin/modprobe='/usr/local/sbin/modprobe'? or after?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: module-init-tools
« Reply #10 on: February 27, 2014, 01:26:47 PM »
Both  ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline MSumulong

  • Newbie
  • *
  • Posts: 25
Re: module-init-tools
« Reply #11 on: February 27, 2014, 01:54:27 PM »
Both  ;)

Before installing module-init-tools.tcz:

modprobe is /sbin/modprobe


After installing module-init-tools.tcz:

modprobe is a tracked alias for /sbin/modprobe


After editing the .ashrc:

modprobe is a tracked alias for /sbin/modprobe


After typing "alias /sbin/modprobe='/usr/local/sbin/modprobe'":

modprobe is /usr/local/sbin/modprobe

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: module-init-tools
« Reply #12 on: February 27, 2014, 02:12:14 PM »
After installing module-init-tools.tcz:

modprobe is a tracked alias for /sbin/modprobe

Try:
Code: [Select]
hash -r
type modprobe
instead.

Quote
After editing the .ashrc:

modprobe is a tracked alias for /sbin/modprobe

Editing .ashrc will only affect shells started after that.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline MSumulong

  • Newbie
  • *
  • Posts: 25
Re: module-init-tools
« Reply #13 on: February 28, 2014, 08:45:19 AM »
After installing module-init-tools.tcz:

modprobe is a tracked alias for /sbin/modprobe

Try:
Code: [Select]
hash -r
type modprobe
instead.

Quote
After editing the .ashrc:

modprobe is a tracked alias for /sbin/modprobe

Editing .ashrc will only affect shells started after that.


Before installing module-init-tools.tcz:

hash -r; type modprobe
modprobe is /sbin/modprobe

After installing module-init-tools.tcz:

hash -r; type modprobe
modprobe is /usr/local/sbin/modprobe

After adding alias:

hash -r; type modprobe
modprobe is /usr/local/sbin/modprobe



Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: module-init-tools
« Reply #14 on: February 28, 2014, 09:11:51 AM »
Before installing module-init-tools.tcz:

hash -r; type modprobe
modprobe is /sbin/modprobe

After installing module-init-tools.tcz:

hash -r; type modprobe
modprobe is /usr/local/sbin/modprobe

In given context this implies that your PATH and extension both seem to work fine as expected, but that there is a hardcoding bug in the software you try to run as already hinted in Reply #4.

Quote
After adding alias:

hash -r; type modprobe
modprobe is /usr/local/sbin/modprobe

Ah, yes, this is expected, what would be relevant instead would be:
Code: [Select]
type /sbin/modprobe
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)