lsmod | grep -q "^cifs\s" || {
- sudo modprobe cifs
- log_error "[ERROR] kernel module cifs is missing (try: sudo modprobe cifs)"
About function: log_error "$message": '[ERROR]' is no need in $message, it already be in $LKP_SRC/lib/log.sh
log_error() { echo "$(date +'%F %T') [ERROR] -- $*" >&2 }
And the below code have the same problem.
OK.
Thanks, Yinsi
Thanks Yu Chuan
- exit 1
}
docker_rm initrd-cifs diff --git a/container/os-cifs/start b/container/os-cifs/start index 5e08238..47da260 100755 --- a/container/os-cifs/start +++ b/container/os-cifs/start @@ -3,9 +3,11 @@ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
. $CCI_SRC/container/defconfig.sh +. $LKP_SRC/lib/log.sh
lsmod | grep -q "^cifs\s" || {
- sudo modprobe cifs
- log_error "[ERROR] kernel module cifs is missing (try: sudo modprobe cifs)"
- exit 1
}
docker_rm os-cifs diff --git a/container/os-nfs/start b/container/os-nfs/start index 8b8ff5f..8c08db8 100755 --- a/container/os-nfs/start +++ b/container/os-nfs/start @@ -3,12 +3,15 @@ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
. $CCI_SRC/container/defconfig.sh +. $LKP_SRC/lib/log.sh
lsmod | grep -q "^nfs\s" || {
- sudo modprobe nfs
- log_error "[ERROR] kernel module nfs is missing (try: sudo modprobe nfs)"
- exit 1
} lsmod | grep -q "^nfsd\s" || {
- sudo modprobe nfsd
- log_error "[ERROR] kernel module nfsd is missing (try: sudo modprobe nfsd)"
- exit 1
}
# Several nfs servers running will cause conflict, so rm an old before running a new nfs server docker. diff --git a/container/result-cifs/start b/container/result-cifs/start index 2d6acba..4f8c2b9 100755 --- a/container/result-cifs/start +++ b/container/result-cifs/start @@ -3,9 +3,11 @@ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
. $CCI_SRC/container/defconfig.sh +. $LKP_SRC/lib/log.sh
lsmod | grep -q "^cifs\s" || {
- sudo modprobe cifs
- log_error "[ERROR] kernel module cifs is missing (try: sudo modprobe cifs)"
- exit 1
}
docker_rm result-cifs
2.23.0