Browse Source

check if directory exist

Waldemar Brodkorb 8 years ago
parent
commit
1430dad67c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      package/base-files/src/etc/functions.sh

+ 3 - 1
package/base-files/src/etc/functions.sh

@@ -11,7 +11,9 @@ append() {
 }
 
 load_modules() {
-	(sed "s,^[^#][^[:space:]]*,insmod /lib/modules/$(uname -r)/&.ko," $* | sh 2>&- || :)
+	if [ -d /lib/modules/$(uname -r) ]; then
+  		(sed "s,^[^#][^[:space:]]*,insmod /lib/modules/$(uname -r)/&.ko," $* | sh 2>&- || :)
+	fi
 }
 
 user_exists() {