From adeba36e5baeefa704eaa18fa6a1edb2acfc1783 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 9 Sep 2007 12:36:49 +0200 Subject: hook-functions: protect sys_walk_modalias() check that the modalias really exists, otherwise no need to add anything. --- hook-functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hook-functions') diff --git a/hook-functions b/hook-functions index 9becfe2..55fb342 100644 --- a/hook-functions +++ b/hook-functions @@ -207,7 +207,9 @@ sys_walk_modalias() device_path="$(dirname "${1}")" device_path="$(dirname "${device_path}")" - modalias=$(cat "${device_path}/modalias") + if [ -e "${device_path}/modalias" ]; then + modalias=$(cat "${device_path}/modalias") + fi if [ -n "${modalias}" ]; then force_load "${modalias}" -- cgit v1.2.3