systemd: Cannot disable generated unit file
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
How can I disable a unit generated by systemd-fstab-generator
or systemd.generator
?
Here's my attempt:
$ systemctl is-enabled media-backup.automount
generated
$ echo $?
0
$ sudo systemctl disable media-backup.automount
$ echo $?
0
$ systemctl is-enabled media-backup.automount
generated
$ echo $?
0
As you can see from the exit status 0
the .automount
unit is still enabled.
systemd
add a comment |Â
up vote
1
down vote
favorite
How can I disable a unit generated by systemd-fstab-generator
or systemd.generator
?
Here's my attempt:
$ systemctl is-enabled media-backup.automount
generated
$ echo $?
0
$ sudo systemctl disable media-backup.automount
$ echo $?
0
$ systemctl is-enabled media-backup.automount
generated
$ echo $?
0
As you can see from the exit status 0
the .automount
unit is still enabled.
systemd
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
How can I disable a unit generated by systemd-fstab-generator
or systemd.generator
?
Here's my attempt:
$ systemctl is-enabled media-backup.automount
generated
$ echo $?
0
$ sudo systemctl disable media-backup.automount
$ echo $?
0
$ systemctl is-enabled media-backup.automount
generated
$ echo $?
0
As you can see from the exit status 0
the .automount
unit is still enabled.
systemd
How can I disable a unit generated by systemd-fstab-generator
or systemd.generator
?
Here's my attempt:
$ systemctl is-enabled media-backup.automount
generated
$ echo $?
0
$ sudo systemctl disable media-backup.automount
$ echo $?
0
$ systemctl is-enabled media-backup.automount
generated
$ echo $?
0
As you can see from the exit status 0
the .automount
unit is still enabled.
systemd
asked Nov 19 '17 at 9:10
Tom Hale
5,82422576
5,82422576
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
You can use noauto
option in fstab to disable systemd from automatically mounting the fstab entry.
add a comment |Â
up vote
1
down vote
accepted
From this answer:
Generated unit files are not automatically activated by systemd. There's nothing special about them as far as systemd is concerned. Each individual generator has to explicitly create symbolic links that connect a generated unit to a target, so that activating the target activates the generated unit via a dependency in the normal way.
Removing the symlink under /run/systemd/generator/local-fs.target.wants
will disable the .automount
until the next boot.
To stop the boot-time generation of the unit, add noauto
to the /etc/fstab
entry as sebasth said.
Be aware that there is some magic required tostop an
.automount` unit without unmounting the filesystem.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
You can use noauto
option in fstab to disable systemd from automatically mounting the fstab entry.
add a comment |Â
up vote
1
down vote
You can use noauto
option in fstab to disable systemd from automatically mounting the fstab entry.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You can use noauto
option in fstab to disable systemd from automatically mounting the fstab entry.
You can use noauto
option in fstab to disable systemd from automatically mounting the fstab entry.
answered Nov 19 '17 at 11:27
sebasth
5,93921641
5,93921641
add a comment |Â
add a comment |Â
up vote
1
down vote
accepted
From this answer:
Generated unit files are not automatically activated by systemd. There's nothing special about them as far as systemd is concerned. Each individual generator has to explicitly create symbolic links that connect a generated unit to a target, so that activating the target activates the generated unit via a dependency in the normal way.
Removing the symlink under /run/systemd/generator/local-fs.target.wants
will disable the .automount
until the next boot.
To stop the boot-time generation of the unit, add noauto
to the /etc/fstab
entry as sebasth said.
Be aware that there is some magic required tostop an
.automount` unit without unmounting the filesystem.
add a comment |Â
up vote
1
down vote
accepted
From this answer:
Generated unit files are not automatically activated by systemd. There's nothing special about them as far as systemd is concerned. Each individual generator has to explicitly create symbolic links that connect a generated unit to a target, so that activating the target activates the generated unit via a dependency in the normal way.
Removing the symlink under /run/systemd/generator/local-fs.target.wants
will disable the .automount
until the next boot.
To stop the boot-time generation of the unit, add noauto
to the /etc/fstab
entry as sebasth said.
Be aware that there is some magic required tostop an
.automount` unit without unmounting the filesystem.
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
From this answer:
Generated unit files are not automatically activated by systemd. There's nothing special about them as far as systemd is concerned. Each individual generator has to explicitly create symbolic links that connect a generated unit to a target, so that activating the target activates the generated unit via a dependency in the normal way.
Removing the symlink under /run/systemd/generator/local-fs.target.wants
will disable the .automount
until the next boot.
To stop the boot-time generation of the unit, add noauto
to the /etc/fstab
entry as sebasth said.
Be aware that there is some magic required tostop an
.automount` unit without unmounting the filesystem.
From this answer:
Generated unit files are not automatically activated by systemd. There's nothing special about them as far as systemd is concerned. Each individual generator has to explicitly create symbolic links that connect a generated unit to a target, so that activating the target activates the generated unit via a dependency in the normal way.
Removing the symlink under /run/systemd/generator/local-fs.target.wants
will disable the .automount
until the next boot.
To stop the boot-time generation of the unit, add noauto
to the /etc/fstab
entry as sebasth said.
Be aware that there is some magic required tostop an
.automount` unit without unmounting the filesystem.
edited Nov 21 '17 at 9:12
answered Nov 21 '17 at 9:04
Tom Hale
5,82422576
5,82422576
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405566%2fsystemd-cannot-disable-generated-unit-file%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password