From 34b4e154a1f6ef11ac93c4752e0dcf9d6ee1a68f Mon Sep 17 00:00:00 2001 From: link Date: Wed, 12 Apr 2023 13:53:27 +0800 Subject: [PATCH] fix reboot auto mount (#1007) --- main.go | 4 ++-- route/init.go | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index b5b5f040c..34bd1212c 100644 --- a/main.go +++ b/main.go @@ -82,8 +82,8 @@ func init() { route.InitFunction() /// - // service.MountLists = make(map[string]*mountlib.MountPoint) - // configfile.Install() + //service.MountLists = make(map[string]*mountlib.MountPoint) + //configfile.Install() } // @title casaOS API diff --git a/route/init.go b/route/init.go index ff78e61e1..3e3c64007 100644 --- a/route/init.go +++ b/route/init.go @@ -92,6 +92,9 @@ func InitNetworkMount() { } connection.Directories = strings.Join(directories, ",") service.MyService.Connections().UpdateConnection(&connection) - service.MyService.Storage().CheckAndMountAll() + } + err := service.MyService.Storage().CheckAndMountAll() + if err != nil { + logger.Error("mount storage err", zap.Any("err", err)) } }