Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openrc service files are non-functional if sys-apps/openrc isn't yet installed on the system #12683

Closed
Peter-Levine opened this issue Oct 26, 2021 · 2 comments · Fixed by Peter-Levine/zfs#1 or #12692
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@Peter-Levine
Copy link
Contributor

System information

Type Version/Name
Distribution Name Gentoo Linux
Distribution Version 17.1
Kernel Version 5.10.61-gentoo-x86_64
Architecture x86_64
OpenZFS Version zfs-2.1.1-r2-gentoo / zfs-kmod-2.1.1-r0-gentoo

Describe the problem you're observing

When switching from systemd to openrc on Gentoo, if sys-fs/zfs is merged before sys-apps/openrc then zfs service scripts appear to succeed but have no effect.

Describe how to reproduce the problem

(Switch from a systemd to a non-systemd profile, eg.)

eselect profile set  default/linux/amd64/17.1/desktop/plasma
emerge -1 sys-fs/zfs sys-apps/openrc

The issue occurs because of:

AS_IF([test -x "/sbin/openrc-run"],

In general, Gentoo installs openrc init scripts and systemd unit files unconditioally. This removes the need for dependencies on individual init systems and aids the transition between openrc and systemd. All openrc init scripts are expected to have the shebang #!/sbin/openrc-run. AFAICT, it's the same for Alpine, though they package the init scripts seperatly and don't support systemd.

See https://bugs.gentoo.org/820278

@rincebrain
Copy link
Contributor

You probably want to reopen this, I think, lest it get lost in the shuffle if your PR doesn't get merged in a timely fashion.

@Peter-Levine Peter-Levine reopened this Oct 26, 2021
@gyakovlev
Copy link
Contributor

similar issue: #8204

behlendorf pushed a commit that referenced this issue Oct 29, 2021
Gentoo and Alpine always set the rc init scripts' shebang to
#!/sbin/openrc-run, whether or not openrc is installed.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Closes #12683 
Closes #12692
xin3liang pushed a commit to xin3liang/zfs that referenced this issue Feb 28, 2023
Gentoo and Alpine always set the rc init scripts' shebang to
#!/sbin/openrc-run, whether or not openrc is installed.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Closes openzfs#12683 
Closes openzfs#12692
xin3liang pushed a commit to xin3liang/zfs that referenced this issue Feb 28, 2023
Add config support for openEuler, so that it set the right sysconfig
dir for openEuler.

And DEFAULT_INIT_SCRIPT is no longer needed since commit "2a34db1bd
Base init scripts for SYSV systems".

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Closes openzfs#14241

Set DEFAULT_INIT_SHELL to /sbin/openrc-run for Gentoo and Alpine

Gentoo and Alpine always set the rc init scripts' shebang to

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Closes openzfs#12683
Closes openzfs#12692
behlendorf pushed a commit that referenced this issue Mar 1, 2023
Gentoo and Alpine always set the rc init scripts' shebang to
#!/sbin/openrc-run, whether or not openrc is installed.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Closes #12683 
Closes #12692
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
3 participants