Skip to main content
Changed the title in a way that reflects the problem you are trying to solve.
Link

How can I force systemd service always disabled onto start at boot

added 2 characters in body
Source Link

Apologies if I am missing details, I may not be aware of all the areas on systemd I am trying to make my phosphor-watchdog service start automatically after another service, I cannot understand why it is by default disabled.

> /lib/systemd/system# ls |grep phosphor-watchdog
>
> [email protected]
>
> [email protected]

/lib/systemd/system# systemctl status [email protected][email protected] - Phosphor poweron watchdog
     Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
    Drop-In: /lib/systemd/system/[email protected]
             └─poweron.conf
     Active: inactive (dead)

this is the service file for phosphor-watchdog service :

[Unit]
Description=Phosphor %I watchdog
[email protected]
After=pwr-monitor.service

[Service]
Restart=always
EnvironmentFile={envfiledir}/obmc/watchdog/%I
ExecStart=/usr/bin/env phosphor-watchdog --continue --service=${{SERVICE}} --path=${{DEVPATH}} --target=${{TARGET}}
SyslogIdentifier=phosphor-watchdog

[Install]
WantedBy=multi-user.target

and for [email protected]/poweron.conf:

[Unit]
[email protected]
[email protected]
[email protected]

I am wondering why is my service always disabled despite the presence of "WantedBy=multi-user.target" FYI

FYI: with systemctl enable everything works fine, but I want it to be enabled by default.

please let me know if I need to give further information. Thank you.

Apologies if I am missing details, I may not be aware of all the areas on systemd I am trying to make my phosphor-watchdog service start automatically after another service, I cannot understand why it is by default disabled.

> /lib/systemd/system# ls |grep phosphor-watchdog
>
> [email protected]
>
> [email protected]

/lib/systemd/system# systemctl status [email protected][email protected] - Phosphor poweron watchdog
     Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
    Drop-In: /lib/systemd/system/[email protected]
             └─poweron.conf
     Active: inactive (dead)

this is the service file for phosphor-watchdog service :

[Unit]
Description=Phosphor %I watchdog
[email protected]
After=pwr-monitor.service

[Service]
Restart=always
EnvironmentFile={envfiledir}/obmc/watchdog/%I
ExecStart=/usr/bin/env phosphor-watchdog --continue --service=${{SERVICE}} --path=${{DEVPATH}} --target=${{TARGET}}
SyslogIdentifier=phosphor-watchdog

[Install]
WantedBy=multi-user.target

and for [email protected]/poweron.conf:

[Unit]
[email protected]
[email protected]
[email protected]

I am wondering why is my service always disabled despite the presence of "WantedBy=multi-user.target" FYI: with systemctl enable everything works fine, but I want it to be enabled by default.

please let me know if I need to give further information. Thank you.

Apologies if I am missing details, I may not be aware of all the areas on systemd I am trying to make my phosphor-watchdog service start automatically after another service, I cannot understand why it is by default disabled.

> /lib/systemd/system# ls |grep phosphor-watchdog
>
> [email protected]
>
> [email protected]

/lib/systemd/system# systemctl status [email protected][email protected] - Phosphor poweron watchdog
     Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
    Drop-In: /lib/systemd/system/[email protected]
             └─poweron.conf
     Active: inactive (dead)

this is the service file for phosphor-watchdog service :

[Unit]
Description=Phosphor %I watchdog
[email protected]
After=pwr-monitor.service

[Service]
Restart=always
EnvironmentFile={envfiledir}/obmc/watchdog/%I
ExecStart=/usr/bin/env phosphor-watchdog --continue --service=${{SERVICE}} --path=${{DEVPATH}} --target=${{TARGET}}
SyslogIdentifier=phosphor-watchdog

[Install]
WantedBy=multi-user.target

and for [email protected]/poweron.conf:

[Unit]
[email protected]
[email protected]
[email protected]

I am wondering why is my service always disabled despite the presence of "WantedBy=multi-user.target"

FYI: with systemctl enable everything works fine, but I want it to be enabled by default.

please let me know if I need to give further information. Thank you.

added 91 characters in body
Source Link

Apologies if I am missing details, I may not be aware of all the areas on systemd I am trying to make my phosphor-watchdog service start automatically after another service, I cannot understand why it is by default disabled.

> /lib/systemd/system# ls |grep phosphor-watchdog
>
> [email protected]
>
> [email protected]

/lib/systemd/system# systemctl status [email protected][email protected] - Phosphor poweron watchdog
     Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
    Drop-In: /lib/systemd/system/[email protected]
             └─poweron.conf
     Active: inactive (dead)

this is the service file for phosphor-watchdog service :

[Unit]
Description=Phosphor %I watchdog
[email protected]
After=pwr-monitor.service

[Service]
Restart=always
EnvironmentFile={envfiledir}/obmc/watchdog/%I
ExecStart=/usr/bin/env phosphor-watchdog --continue --service=${{SERVICE}} --path=${{DEVPATH}} --target=${{TARGET}}
SyslogIdentifier=phosphor-watchdog

[Install]
WantedBy=multi-user.target

and for [email protected]/poweron.conf:

[Unit]
[email protected]
[email protected]
[email protected]

I am wondering why is my service always disabled despite the presence of "WantedBy=multi-user.target" FYI: with systemctl enable everything works fine, but I want it to be enabled by default.

please let me know if I need to give further information. Thank you.

Apologies if I am missing details, I may not be aware of all the areas on systemd I am trying to make my phosphor-watchdog service start automatically after another service, I cannot understand why it is by default disabled.

> /lib/systemd/system# ls |grep phosphor-watchdog
>
> [email protected]
>
> [email protected]

/lib/systemd/system# systemctl status [email protected][email protected] - Phosphor poweron watchdog
     Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
    Drop-In: /lib/systemd/system/[email protected]
             └─poweron.conf
     Active: inactive (dead)

this is the service file for phosphor-watchdog service :

[Unit]
Description=Phosphor %I watchdog
[email protected]
After=pwr-monitor.service

[Service]
Restart=always
EnvironmentFile={envfiledir}/obmc/watchdog/%I
ExecStart=/usr/bin/env phosphor-watchdog --continue --service=${{SERVICE}} --path=${{DEVPATH}} --target=${{TARGET}}
SyslogIdentifier=phosphor-watchdog

[Install]
WantedBy=multi-user.target

and for [email protected]/poweron.conf:

[Unit]
[email protected]
[email protected]
[email protected]

I am wondering why is my service always disabled despite the presence of "WantedBy=multi-user.target"

please let me know if I need to give further information. Thank you.

Apologies if I am missing details, I may not be aware of all the areas on systemd I am trying to make my phosphor-watchdog service start automatically after another service, I cannot understand why it is by default disabled.

> /lib/systemd/system# ls |grep phosphor-watchdog
>
> [email protected]
>
> [email protected]

/lib/systemd/system# systemctl status [email protected][email protected] - Phosphor poweron watchdog
     Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
    Drop-In: /lib/systemd/system/[email protected]
             └─poweron.conf
     Active: inactive (dead)

this is the service file for phosphor-watchdog service :

[Unit]
Description=Phosphor %I watchdog
[email protected]
After=pwr-monitor.service

[Service]
Restart=always
EnvironmentFile={envfiledir}/obmc/watchdog/%I
ExecStart=/usr/bin/env phosphor-watchdog --continue --service=${{SERVICE}} --path=${{DEVPATH}} --target=${{TARGET}}
SyslogIdentifier=phosphor-watchdog

[Install]
WantedBy=multi-user.target

and for [email protected]/poweron.conf:

[Unit]
[email protected]
[email protected]
[email protected]

I am wondering why is my service always disabled despite the presence of "WantedBy=multi-user.target" FYI: with systemctl enable everything works fine, but I want it to be enabled by default.

please let me know if I need to give further information. Thank you.

Source Link
Loading