jcnelson / vdev

A device-file manager for *nix
GNU General Public License v3.0
101 stars 13 forks source link

dev-setup.sh #79

Closed Obarun closed 8 years ago

Obarun commented 9 years ago

The function feed_static_nodes_kmod() in dev-setup.sh seem to not work properly. name with / within cause trouble. Well i tried make rectification on it than you can find here https://github.com/Obarun/vdev/commit/4f47e0bf9c8c50e4d6f053738e5642f44fcfbfde. I don't make a pull request to do not polluate if i'm wrong. So please take a look on it, and tell me. Surely the syntax can be better, i'm not a good developper :). Onemore, you will see too a commit about modprobe.sh. i added a log output and the variable VDEV_OS_MODALIAS haven't the good name, so modprobe can load modules.

jcnelson commented 9 years ago

Hi @Obarun, thank you for your patch.

The dev-setup.sh script is invoked by vdevd when it starts up, in order to discover the set of device files to create before it can proceed to process the /sys/devices tree. It basically translates the output of kmod into a format it can parse into a struct vdev_device_request, and feed into its helper programs in /lib/vdev.

Regarding the patch, as a policy vdev's scripts do not use programs that are typically installed to /usr, in order to support mounting /usr late in the boot process (such as after the network comes up). This means that vdev's scripts can't depend on awk, tr, and cut.

Maybe there's another way to solve the problem. Can you give me an example trace of the problem you're encountering with feed_static_nodes_kmod()?

Obarun commented 9 years ago

Sorry for my late answer i was very busy. Thank you for your explanation. awk tr cut was added in my initramfs and i use busybox too on it, so no problem with that. Nothing is wrong in dev-setup.sh, it was a stupidity on my part. a misunderstanding about modules made me change the function to try to load the modules for static-nodes. Actually if i don't load thoses modules (fuse, cuse, vfio...) manualy it seem never loaded. So i was change my function to make test keeping your original dev-setup.sh, i just added one function more. Well sorry again for that.

jcnelson commented 9 years ago

I'm sorry for my late reply--I've been busy too.

Glad you were able to resolve the problem :)