Debian 系统单位什么也不做

Debian 系统单位什么也不做,debian,mount,systemd,Debian,Mount,Systemd,我需要一个接一个地装入文件系统,但由于显然无法在/etc/fstab中指定顺序,我制作了一个systemd单元文件,如下所示: [Unit] Description=Mount After=local-fs.target [Service] Type=simple ExecStart=/bin/mount /mnt/dir [Install] WantedBy=multi-user.target 问题是它没有失败,但也没有成功。当我手动执行systemctl restart操作时,什么也没

我需要一个接一个地装入文件系统,但由于显然无法在
/etc/fstab
中指定顺序,我制作了一个systemd单元文件,如下所示:

[Unit]
Description=Mount
After=local-fs.target

[Service]
Type=simple
ExecStart=/bin/mount /mnt/dir

[Install]
WantedBy=multi-user.target

问题是它没有失败,但也没有成功。当我手动执行
systemctl restart
操作时,什么也没有发生,文件系统没有装入。如果我安装了
mount/mnt/dir
它可以工作,尽管…

使用专用的安装单元:

根据您的需要进行调整

[Unit]
Description=Mount Unit
After=another-mount.mount

[Mount]
What=/something
Where=/to/destination
Type=ext4
Options=defaults

[Install]
WantedBy=multi-user.target