Files
ssm-services/services/hwdetect
T

16 lines
583 B
Plaintext
Raw Normal View History

2017-07-13 16:09:42 +03:00
#!/usr/bin/env ssm
2014-10-07 13:19:40 +04:00
service_type='oneshot'
2017-07-13 16:09:42 +03:00
service_command=( /usr/bin/true )
2014-10-07 13:19:40 +04:00
2017-07-13 16:09:42 +03:00
pre_start() {
printf '(${service_name}) Running module autodetect...\n'
2014-10-07 13:19:40 +04:00
2017-07-13 16:09:42 +03:00
# 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.
2014-10-07 13:19:40 +04:00
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
}