forked from Spark/ssm-services
network scripts
This commit is contained in:
18
init.d/hwdetect
Executable file
18
init.d/hwdetect
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env watchman
|
||||
|
||||
service_type='oneshot'
|
||||
|
||||
start() {
|
||||
watchman.msg "Running module autodetect..."
|
||||
watchman.start
|
||||
}
|
||||
|
||||
spawn() {
|
||||
# The Alpine Linux hwdetect script runs this twice.
|
||||
# Apparently to make sure we get devices that appear after loading a module on the first run.
|
||||
find /sys -name modalias -type f -print0 | xargs -0 sort -u | xargs modprobe -b -a 2>/dev/null
|
||||
find /sys -name modalias -type f -print0 | xargs -0 sort -u | xargs modprobe -b -a 2>/dev/null
|
||||
|
||||
# This script cannot be regarded as failed. It has no definitive failure state.
|
||||
return 0
|
||||
}
|
Reference in New Issue
Block a user