LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-27-2020, 05:19 AM   #1
ayyasprings
Member
 
Registered: Aug 2014
Posts: 100

Rep: Reputation: Disabled
Are /sbin/hotplug script and scripts under /etc/hotplug.d/ directory not used now?


Hi,

In the Linux Device Driver 3rd edition book by Jonathan Corbet, Allessandro Rubini and Greg Kroah-Hartman I see like on any kobject event and after some filtering and environment information stuff added as argument to /sbin/hotplug script which will again invoke the required scripts under /etc/hotplug.d/ directory based on the environment data passed as arguments previously for hot plug mechanism.

But I could not see both /sbin/hotplug or /etc/hotplug.d/ directory in my laptop.
Are those not used now and replaced with some other mechanisms?

I am using ubuntu 14.04 LTS.

Please reply.

Thanks,
Ayyappan
 
Old 06-28-2020, 12:01 AM   #2
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,698

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Are those not used now and replaced with some other mechanisms?
Yes, udev supplanted it years ago, and has continued to evolve substantially from what is likely described in the book you're reading

Refer
https://en.wikipedia.org/wiki/Udev

Quote:
Overview

Unlike traditional Unix systems, where the device nodes in the /dev directory have been a static set of files, the Linux udev device manager dynamically provides only the nodes for the devices actually present on a system. Although devfs used to provide similar functionality, Greg Kroah-Hartman cited a number of reasons[4] for preferring udev over devfs:

udev supports persistent device naming, which does not depend on, for example, the order in which the devices are plugged into the system. The default udev setup provides persistent names for storage devices. Any hard disk is recognized by its unique filesystem id, the name of the disk and the physical location on the hardware it is connected to.
udev executes entirely in user space, as opposed to devfs's kernel space. One consequence is that udev moved the naming policy out of the kernel and can run arbitrary programs to compose a name for the device from the device's properties, before the node is created; there, the whole process is also interruptible and it runs with a lower priority.

The udev, as a whole, is divided into three parts:

Library libudev that allows access to device information; it was incorporated into the systemd 183 software bundle.[5]
User space daemon udevd that manages the virtual /dev.
Administrative command-line utility udevadm for diagnostics.

The system gets calls from the kernel via netlink socket. Earlier versions used hotplug, adding a link to themselves in /etc/hotplug.d/default with this purpose.
 
2 members found this post helpful.
Old 06-29-2020, 01:49 AM   #3
ayyasprings
Member
 
Registered: Aug 2014
Posts: 100

Original Poster
Rep: Reputation: Disabled
Hi Ferrari,

After exploring with udev, I came to know mdev, another light weight utility used in embedded systems.

Please let me know any other alternatives currently in use for embedded systems as well as desktops/high end servers like that.

Thanks a lot in advance.
 
Old 06-29-2020, 02:22 AM   #4
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,698

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Google might be your friend here. I have no need to use anything other than udev.

A quick search turned out these...
https://core.suckless.org/smdev/
https://core.suckless.org/nldev/

Gentoo and friends offer eudev which is a fork of udev for those using alternative init systems.
https://wiki.gentoo.org/wiki/Eudev

YMMV.

Last edited by ferrari; 06-29-2020 at 02:25 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/acpi/acpi_handler.sh uses /sbin/init instead of /sbin/shutdown xj25vm Slackware 2 04-07-2013 04:10 AM
Root ShelI Change - changed /etc/passwd /sbin/sh to /sbin/bash and gave No Shell mn35 Solaris / OpenSolaris 13 04-13-2010 04:24 AM
/sbin/rc: line 271: /sbin/devfsd: No such file or directory Alexander.s Linux - General 3 04-22-2005 04:44 PM
As root, not seeing /sbin and /usr/sbin in path weghman Linux - Newbie 3 04-25-2004 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration