Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/proc/bus/usb is disabled on newer kernel #69

Closed
abucodonosor opened this issue Mar 20, 2017 · 9 comments
Closed

/proc/bus/usb is disabled on newer kernel #69

abucodonosor opened this issue Mar 20, 2017 · 9 comments

Comments

@abucodonosor
Copy link
Contributor

hello,

I think you should check /proc/bus/usb exists before you try to mount it..

https://github.com/troglobit/finit/blob/master/src/finit.c#L260

since that feature is disabled in most newer kernels.

something like this maybe:

http://sigsegv.spdns.eu/~crazy/check_proc_bus_usb.patch

PS: do you have any support channel for finit ?

Best Regards

@troglobit
Copy link
Owner

Hi @abucodonosor,

yeah that patch looks just about right. Thank you for pointing it out! I'll import it tonight, or later this week if I run out of time.

Nope, people usually either email me or file GitHub issues, I prefer GitHub although I've considered creating a common mailing list for all my projects.

@abucodonosor
Copy link
Contributor Author

Just take your time..

Ok then I'll open issues or feature request on GitHub..

Off Topic

The reason I'm asking about a support channel was bc we want to test finit for our Distro
and I got some qestions :)

The only issue I have so far is the way finit enables services from /etc/finit.d/something.conf
since I would need a way to install some package or service-something.conf but not enabling it
by default but having some tool to do so..

Would be posible to add something like this ?

Also I think a lot of your

run(/some_path/some_app)

could be detected from configure.ac also some switches could be added like

--with-mount-bin=/foo/mount etc

since there are lot differences between Distros and the way / PATHs they
install sw.

Best Regards

troglobit added a commit that referenced this issue Mar 20, 2017
Most newer kernels have usbfs disabled by default.
See issue #69 for details.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
@troglobit
Copy link
Owner

What you can do is to add your /etc/finit.d/service.conf but keep the actual service ... line commented out. This is practiced by, e.g. Debian, for inetd services in the /etc/inetd.conf file:

    # /etc/finit.d/sshd.conf
    #service :2 [345] /sbin/dropbear -R -F -p 222  -- SSH daemon

I've been thinking about adding somthing similar myself to initctl. It could be implemented like this:

$ sudo initctl enable sshd
Enabling /etc/finit.d/sshd.conf

Which would simply remove the # sign at the beginning of the service line(s). Dunno, maybe it should be initctl enable dropbear:2 ... any input on this would be interesting to discuss.

@troglobit
Copy link
Owner

Any patches, preferably as pull requests, to support --with-mount-cmd=/foo/mount is more than welcome! 😉

Currently I have no need for this myself, embedded BusyBox-based targets are my primary target,
with Alpine and Debian being the only non-embedded targets I supply examples for.

@abucodonosor
Copy link
Contributor Author

abucodonosor commented Mar 20, 2017

Sure I can work on that .. but I will take some time since I'm moving location right now.

The idea with initctl enable sounds fine.. but you have to mess with manipulating the files etc.

How about a simple

/etc/finit.d/disabled-dir/files

initctl add foo
( checks foo exists disabled , symlinks foo to /etc/finit.d/foo , and reloads)

initctl del foo
( checks foo is enabled && is a symlink , if yes remove , if not warn this is an service installed
under /etc/finit.d and enabled by default )

@troglobit
Copy link
Owner

troglobit commented Mar 20, 2017

Hmm, dunno ... feels a bit too SysV init and I guess we're bordering on distribution specifics.

In my mind I was more thinking about initctl add being a way to create new services in /etc/finit.d rather than from a template. Like this:

initctl service add /sbin/exampled -n -- Some description

Have to think about that a bit. Anyway, this should be a separate issue.

@abucodonosor
Copy link
Contributor Author

Right should I open an new issue for it ?

Also I don't mind the way you want to implement this ..
I really like your config syntax and the way things are working . : )

@troglobit
Copy link
Owner

troglobit commented Mar 20, 2017 via email

troglobit added a commit that referenced this issue Jul 1, 2017
See issue #69 for a background.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
troglobit added a commit that referenced this issue Jul 3, 2017
This patch implemements a new feature of libite v1.9.1, whichp(), which
instead of fexist() that requires an absolute path, searches $PATH.

For reference, see issue #69 and PRs #70 and #72.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
troglobit added a commit that referenced this issue Jul 3, 2017
Since at least a44daf2 both run() and run_interactive() can access all
system tools in _PATH_STDPATH.  A system that uses non-standard paths,
e.g. /system/bin and /apps/bin, should update _PATH_STDPATH.

For reference, see issue #69 and PRs #70 and #72.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
@troglobit
Copy link
Owner

Closing this issue now since last remaining issue has been fixed on master:

  • A new /etc/finit.d/available sub-directory is supported for installed but disabled services
  • run(/some_path/some_app) can now be called as run(some_app) as long as it is in $PATH
  • The issue with fexist(/some_path/some_app) checking availability of some_app is fixed by the new whichp() API in libite

Thank you @abucodonosor for the great input and sorry for taking so long to fix the issues you pointed out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants