无法在 systemd 中为 /dev 创建自定义挂载点

无法在 systemd 中为 /dev 创建自定义挂载点

我正在嵌入式系统中工作,我们正在从 upstart 迁移到 systemd。我正尝试在 rootfs 中为 /dev 写入 .mount 文件。但这失败了。有人可以帮忙吗?

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=/dev Directory
Documentation=man:hier(7)
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target

[Mount]
What=tmpfs
Where=/dev
Type=tmpfs
Options=mode=1777

我的文件名是dev.mount

我收到以下错误:Cannot add dependency job for unit dev.mount, ignoring: Unit dev.mount failed to load: Invalid argument

我在 stack overflow 上发过同样的问题。如果是错的,我准备删除那个或这个。 https://stackoverflow.com/questions/33242232/cannot-create-custom-mount-point-for-dev-in-systemd

相关内容