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

Incorrect ZPOOL_CACHE automake substitution in the init scripts #370

Closed
dajhorn opened this issue Aug 22, 2011 · 3 comments
Closed

Incorrect ZPOOL_CACHE automake substitution in the init scripts #370

dajhorn opened this issue Aug 22, 2011 · 3 comments

Comments

@dajhorn
Copy link
Contributor

dajhorn commented Aug 22, 2011

Commit aa2b489 moves the zpool.cache file from /etc/zfs to /etc/init.d like this:

 # etc/init.d/zfs.*.in
 -ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
 +ZPOOL_CACHE="@initdir@/zpool.cache"

Automake sets this default in the top Makefile:

 DEFAULT_INIT_DIR = ${prefix}/etc/init.d

This results in:

 ZPOOL_CACHE="/etc/init.d/zpool.cache"
 ...
 $ZPOOL import -c $ZPOOL_CACHE -aN 2>/dev/null
@behlendorf
Copy link
Contributor

Your of course right. Sorry, I wasn't thinking when I made this change... I'll revert these bits.

As an aside, how do you feel about throwing your init script for ubuntu in with the others? If you'ld rather maintain it yourself that's fine but it might be nice to have them all in one place. For example, the 'zfs share -a' change would have automatically made it in then.

@dajhorn
Copy link
Contributor Author

dajhorn commented Aug 23, 2011

I must check whether dh_installinit can use a file produced by an install rule. If yes, then an init script for Ubuntu should be added to the others. (It is unusual that ZFS changes /etc/init.d during an unmanaged installation. None of the major projects in distro do this for a local install.)

The existing init scripts for ZFS have races and dependency cycles in the Ubuntu init stack. I tried a variety of non-invasive fixes, but it looks like patching mountall to recognize ZFS is the best solution. If this happens, then Ubuntu will only need an init.d script for a local install.

@behlendorf
Copy link
Contributor

Yes, having the upstream package provide any real packaging/init scripts/udev rules is a little odd. Typically this is all handled by each downstream distribution since things vary so widely between distributions. Unfortunately, until the package get's an official maintainer for a distribution I feel compelled to provide something.

The existing init scripts for ZFS have races and dependency cycles in the Ubuntu init stack

Issues exactly like this. :)

kernelOfTruth pushed a commit to kernelOfTruth/zfs that referenced this issue Mar 1, 2015
zfsonlinux/spl#bcb15891ab394e11615eee08bba1fd85ac32e158 implemented
Linux 3.6+ support by adding duplicate vn_rename and vn_remove
functions. The new ones were cleaner, but the duplicate functions made
the codebase less maintainable. This adds some compatibility shims that
allow us to retire the older vn_rename and vn_remove in favor of the new
ones on old kernels. The result is a net 143 line reduction in lines of
code and a cleaner codebase.

Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#370
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants