On Tue, Jan 26, 2021 at 11:03:34AM +0800, Liu Yinsi wrote:
lsmod | grep -q "^cifs\s" || {
- sudo modprobe cifs
- echo "[ERROR] cifs module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)"
what's mean Docker host's kernel
容器所在宿主机的内核
you can direct use kernel, no need docker host
Thanks, Shenwei
- exit
}
exit 1
ok
lsmod | grep -q "^cifs\s" || {
- sudo modprobe cifs
- echo "[ERROR] cifs module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)"
- exit
common message can build a func
error_messgae() { echo "[ERROR] $1 module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)" exit 1 }
ok, i will call $LKP_SRC/lib/log.sh
Thanks, Yinsi
Thanks, Shenwei
}
docker_rm os-cifs diff --git a/container/os-nfs/start b/container/os-nfs/start index 8b8ff5f..3b0ebb5 100755 --- a/container/os-nfs/start +++ b/container/os-nfs/start @@ -5,10 +5,12 @@ . $CCI_SRC/container/defconfig.sh
lsmod | grep -q "^nfs\s" || {
- sudo modprobe nfs
- echo "[ERROR] nfs module is not loaded in the Docker host's kernel (try: sudo modprobe nfs)"
- exit
} lsmod | grep -q "^nfsd\s" || {
- sudo modprobe nfsd
- echo "[ERROR] nfsd module is not loaded in the Docker host's kernel (try: sudo modprobe nfsd)"
- exit
}
# 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..3992cdd 100755 --- a/container/result-cifs/start +++ b/container/result-cifs/start @@ -5,7 +5,8 @@ . $CCI_SRC/container/defconfig.sh
lsmod | grep -q "^cifs\s" || {
- sudo modprobe cifs
- echo "[ERROR] cifs module is not loaded in the Docker host's kernel (try: sudo modprobe cifs)"
- exit
}
docker_rm result-cifs
2.23.0