N1安装armbian后不会自动挂载WebDav盘,设置开机自动挂载在WebDAV
普通挂载后,重启就会发现通过 WebDAV 挂载的磁盘没有了,也就意味着你每次重启 Linux 系统,都需要重新挂载,这时候需要更改几个设置来实现开机自动挂载。
第一步.更改配置
编辑davfs2.conf配置文件,将use_locks的1改为0
vim /etc/davfs2/davfs2.conf# davfs2 configuration file 2012-07-19
# version 9
# ------------------------------------
# Copyright (C) 2006, 2007, 2008, 2009, 2012 Werner Baumann
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved.
# Please read the davfs2.conf (5) man page for a description of the
# configuration options and syntax rules.
# Available options and default values
# ====================================
# General Options
# ---------------
# dav_user davfs2 # system wide config file only
# dav_group davfs2 # system wide config file only
# kernel_fs fuse
# buf_size 16 # KiByte
# WebDAV Related Options
# ----------------------
# use_proxy 1 # system wide config file only
# proxy # system wide config file only
# servercert
# clientcert
# secrets ~/.davfs2/secrets # user config file only
# ask_auth 1
use_locks 0
# lock_owner <user-name>
# lock_timeout 1800 # seconds
# lock_refresh 60 # seconds
# use_expect100 0
# if_match_bug 0
# drop_weak_etags 0
# allow_cookie 0
# precheck 1
# ignore_dav_header 0
# server_charset
# connect_timeout 10 # seconds
# read_timeout 30 # seconds
# retry 30 # seconds
# max_retry 300 # seconds
# add_header
# Cache Related Options
# ---------------------
# backup_dir lost+found
# cache_dir /var/cache/davfs2 # system wide cache
# ~/.davfs2/cache # per user cache
# cache_size 50 # MiByte
# table_size 1024
# dir_refresh 60 # seconds
# file_refresh 1 # second
# delay_upload 10
# gui_optimize 0
# Debugging Options
# -----------------
# debug # possible values: config, kernel, cache, http, xml,
# httpauth, locks, ssl, httpbody, secrets, most第二步.添加账号
修改secrets文件,添加账号信息
vim /etc/davfs2/secrets在底部添加账号信息,如
https://pan.cloud.com/dav user password第三步.添加开机挂载命令
vim /etc/rc.local末尾添加挂载命令,和挂在U盘一样
mount -t davfs https://pan.cloud.com/dav /mnt/H1/ALiYun重启即可自动挂载。
评论 (0)