mirror_zfs/config
Turbo Fredriksson 2a34db1bdb Base init scripts for SYSV systems
* Based on the init scripts included with Debian GNU/Linux, then take code
  from the already existing ones, trying to merge them into one set of
  scripts that will work for 'everyone' for better maintainability.
  * Add configurable variables to control the workings of the init scripts:
    * ZFS_INITRD_PRE_MOUNTROOT_SLEEP
      Set a sleep time before we load the module (used primarily by initrd
      scripts to allow for slower media (such as  USB devices etc) to be
      availible before we load the zfs module).
    * ZFS_INITRD_POST_MODPROBE_SLEEP
      Set a timed sleep in the initrd to after the load of the zfs module.
    * ZFS_INITRD_ADDITIONAL_DATASETS
      To allow for mounting additional datasets in the initrd. Primarily used
      in initrd scripts to allow for when filesystem needed to boot (such as
      /usr, /opt, /var etc) isn't directly under the root dataset.
    * ZFS_POOL_EXCEPTIONS
      Exclude pools from being imported (in the initrd and/or init scripts).
    * ZFS_DKMS_ENABLE_DEBUG, ZFS_DKMS_ENABLE_DEBUG_DMU_TX, ZFS_DKMS_DISABLE_STRIP
      Set to control how dkms should build the dkms packages.
    * ZPOOL_IMPORT_PATH
      Set path(s) where "zpool import" should import pools from.
      This was previously the job of "USE_DISK_BY_ID" (which is still used
      for backwards compatibility) but was renamed to allow for better
      control of import path(s).
      * If old USE_DISK_BY_ID is set, but not new ZPOOL_IMPORT_PATH, then we
        set ZPOOL_IMPORT_PATH to sane defaults just to be on the safe side.
    * ZED_ARGS
      To allow for local options to zed without having to change the init script.
  * The import function, do_import(), imports pools by name instead of '-a'
    for better control of pools to import and from where.
    * If USE_DISK_BY_ID is set (for backwards compatibility), but isn't 'yes'
      then ignore it.
    * If pool(s) isn't found with a simple "zpool import" (seen it happen),
      try looking for them in /dev/disk/by-id (if it exists). Any duplicates
      (pools found with both commands) is filtered out.
      * IF we have found extra pool(s) this way, we must force USE_DISK_BY_ID
        so that the first, simple "zpool import $pool" is able to find it.
    * Fallback on importing the pool using the cache file (if it exists) only
      if 'simple' import (either with ZPOOL_IMPORT_PATH or the 'built in'
      defaults) didn't work.
  * The export function, do_export(), will export all pools imported, EXCEPT
    the root pool (if there is one).
  * ZED script from the Debian GNU/Linux packages added.
    * Refreshed ZED init script from behlendorf@5e7a660 to be portable so it
      may be used on both LSB and Redhat style systems.
    * If there is no pool(s) imported and zed successfully shut down, we will
      unload the zfs modules.
  * The function library file for the ZoL init script is installed as
    /etc/init.d/zfs-functions.
  * The four init scripts, the /etc/{defaults,sysconfig,conf.d}/zfs config file
    as well as the common function library is tagged as '%config(noreplace)' in
    the rpm rules file to make sure they are not replaced automatically if locally
    modifed.
  * Pitfals and workarounds:
    * If we're running from init, remove stale /etc/dfs/sharetab before importing
      pools in the zfs-import init script.
    * On Debian GNU/Linux, there's a 'sendsigs' script that will kill basically
      everything quite early in the shutdown phase and zed is/should be stopped
      much later than that. We don't want zed to be among the ones killed, so add
      the zed pid to list of pids for 'sendsigs' to ignore.
    * CentOS uses echo_success() and echo_failure() to print out status of
      command. These in turn uses "echo -n \0xx[etc]" to move cursor and choose
      colour etc. This doesn't work with the modified IFS variable we need to
      use in zfs-import for some reason, so work around that when we define
      zfs_log_{end,failure}_msg() for RedHat and derivative distributions.
  * All scripts passes ShellCheck (with one false positive in do_mount()).

Signed-off-by: Turbo Fredriksson turbo@bayour.com
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Chris Dunlap <cdunlap@llnl.gov>
Closes #2974
Closes #2107
2015-05-28 14:14:53 -07:00
..
.gitignore Add config/compile to config/.gitignore 2014-10-31 16:25:34 -07:00
always-no-unused-but-set-variable.m4 config: compile test rather than run test 2014-03-20 12:11:57 -07:00
config.awk Add build system 2010-08-31 13:41:27 -07:00
deb.am Move the libraries into separate packages 2014-06-02 13:43:20 -07:00
kernel-acl.m4 Make license compatibility checks consistent 2014-10-17 14:58:38 -07:00
kernel-automount.m4 Fix snapshot automounting with GrSecurity constify plugin. 2012-08-24 08:56:38 -07:00
kernel-bdev-block-device-operations.m4 3.10 API change: block_device_operations->release() returns void 2013-07-08 15:41:57 -07:00
kernel-bdev-logical-size.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-bdev-physical-size.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-bdi-setup-and-register.m4 Linux 4.0 compat: bdi_setup_and_register() __must_check 2015-03-16 10:56:26 -07:00
kernel-bio-bvec-iter.m4 Linux 3.14 compat: Immutable biovec changes in vdev_disk.c 2014-04-10 14:28:38 -07:00
kernel-bio-end-io-t-args.m4 Eliminate runtime function pointer mods in autotools checks 2013-03-04 08:49:17 -08:00
kernel-bio-failfast.m4 Linux 2.6.36 compat, use REQ_FAILFAST_MASK and remove pre-2.6.36 support 2015-05-11 15:07:00 -07:00
kernel-bio-rw-syncio.m4 Fix gcc configure warnings 2011-04-19 10:10:47 -07:00
kernel-blk-end-request.m4 Make license compatibility checks consistent 2014-10-17 14:58:38 -07:00
kernel-blk-fetch-request.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-blk-queue-discard.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-blk-queue-flush.m4 Make license compatibility checks consistent 2014-10-17 14:58:38 -07:00
kernel-blk-queue-io-opt.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-blk-queue-max-hw-sectors.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-blk-queue-max-segments.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-blk-queue-nonrot.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-blk-queue-physical-block-size.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-blk-requeue-request.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-blk-rq-bytes.m4 Make license compatibility checks consistent 2014-10-17 14:58:38 -07:00
kernel-blk-rq-pos.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-blk-rq-sectors.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-blkdev-get-by-path.m4 When checking for symbol exports, try compiling. 2012-07-26 13:42:57 -07:00
kernel-blkdev-get.m4 Move partition scanning from userspace to module. 2012-07-17 09:17:31 -07:00
kernel-block-device-operations-release-void.m4 3.10 API change: block_device_operations->release() returns void 2013-07-08 15:41:57 -07:00
kernel-check-disk-size-change.m4 When checking for symbol exports, try compiling. 2012-07-26 13:42:57 -07:00
kernel-clear-inode.m4 When checking for symbol exports, try compiling. 2012-07-26 13:42:57 -07:00
kernel-commit-metadata.m4 Implement .commit_metadata hook for NFS export 2012-10-03 10:49:45 -07:00
kernel-create-nameidata.m4 Eliminate runtime function pointer mods in autotools checks 2013-03-04 08:49:17 -08:00
kernel-d-make-root.m4 When checking for symbol exports, try compiling. 2012-07-26 13:42:57 -07:00
kernel-d-obtain-alias.m4 When checking for symbol exports, try compiling. 2012-07-26 13:42:57 -07:00
kernel-declare-event-class.m4 Swap DTRACE_PROBE* with Linux tracepoints 2014-11-17 11:13:55 -08:00
kernel-dentry-operations.m4 Eliminate runtime function pointer mods in autotools checks 2013-03-04 08:49:17 -08:00
kernel-dirty-inode.m4 Eliminate runtime function pointer mods in autotools checks 2013-03-04 08:49:17 -08:00
kernel-discard-granularity.m4 Set zvol discard_granularity to the volblocksize. 2012-08-07 14:55:31 -07:00
kernel-elevator-change.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-encode-fh-inode.m4 Linux 3.5 compat, eops->encode_fh() takes inodes 2012-07-23 12:29:23 -07:00
kernel-evict-inode.m4 Fix build failures on PaX/GRSecurity patched kernels 2012-07-17 09:22:43 -07:00
kernel-fallocate.m4 Eliminate runtime function pointer mods in autotools checks 2013-03-04 08:49:17 -08:00
kernel-file-inode.m4 Linux 3.19 compat: file_inode was added 2015-02-10 11:24:51 -08:00
kernel-fmode-t.m4 Fix gcc configure warnings 2011-04-19 10:10:47 -07:00
kernel-fsync.m4 Eliminate runtime function pointer mods in autotools checks 2013-03-04 08:49:17 -08:00
kernel-get-disk-ro.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-get-gendisk.m4 When checking for symbol exports, try compiling. 2012-07-26 13:42:57 -07:00
kernel-insert-inode-locked.m4 When checking for symbol exports, try compiling. 2012-07-26 13:42:57 -07:00
kernel-invalidate-bdev-args.m4 Fix gcc configure warnings 2011-04-19 10:10:47 -07:00
kernel-is_owner_or_cap.m4 Refactor inode_owner_or_capable() autotools check 2014-05-01 10:06:49 -07:00
kernel-kobj-name-len.m4 Fix gcc configure warnings 2011-04-19 10:10:47 -07:00
kernel-lookup-bdev.m4 Linux 2.6.26 compat, lookup_bdev() 2013-01-28 15:35:00 -08:00
kernel-lookup-nameidata.m4 Eliminate runtime function pointer mods in autotools checks 2013-03-04 08:49:17 -08:00
kernel-lseek-execute.m4 Add SEEK_DATA/SEEK_HOLE to lseek()/llseek() 2013-07-02 09:24:43 -07:00
kernel-mkdir-umode-t.m4 Eliminate runtime function pointer mods in autotools checks 2013-03-04 08:49:17 -08:00
kernel-mount-nodev.m4 When checking for symbol exports, try compiling. 2012-07-26 13:42:57 -07:00
kernel-open-bdev-exclusive.m4 When checking for symbol exports, try compiling. 2012-07-26 13:42:57 -07:00
kernel-rq-for-each_segment.m4 Linux 3.14 compat: rq_for_each_segment in dmu_req_copy 2014-04-10 14:28:51 -07:00
kernel-rq-is_sync.m4 Only use gcc -Wunused-but-set-variable when available 2013-01-10 16:09:39 -08:00
kernel-security-inode-init.m4 Use -Werror for all kernel configure tests. 2013-02-24 10:20:28 -08:00
kernel-set-nlink.m4 Linux 3.2 compat: set_nlink() 2011-12-16 20:02:52 -08:00
kernel-sget-args.m4 Linux 3.6 compat, sget() 2012-10-14 13:06:48 -07:00
kernel-show-options.m4 Fix NULL pointer dereference on PaX/GRSecurity patched Linux 3.3 and later kernels 2012-07-20 12:31:45 -07:00
kernel-shrink.m4 Fix arc_adapt() spinning in iterate_supers_type() 2013-07-17 09:28:06 -07:00
kernel-truncate-range.m4 Linux 3.5 compat, iops->truncate_range() removed 2012-07-23 12:29:32 -07:00
kernel-truncate-setsize.m4 When checking for symbol exports, try compiling. 2012-07-26 13:42:57 -07:00
kernel-vfs-iterate.m4 Linux 3.11 compat: fops->iterate() 2013-08-15 16:19:07 -07:00
kernel-xattr-handler.m4 Refactor inode_owner_or_capable() autotools check 2014-05-01 10:06:49 -07:00
kernel.m4 Linux 2.6.36 compat, use REQ_FAILFAST_MASK and remove pre-2.6.36 support 2015-05-11 15:07:00 -07:00
mount-helper.m4 The mount helper mount.zfs MUST be in /sbin (not '$sbindir'). 2015-05-18 16:54:36 -07:00
rpm.am Set LANG to a reasonable default (C) 2014-06-10 16:46:21 -07:00
Rules.am Revert "Disable GCCs aggressive loop optimization" 2014-07-22 09:56:55 -07:00
suppressed-warnings.txt Suppress packaging warning 2011-11-08 11:32:04 -08:00
tgz.am Refresh RPM packaging 2013-03-18 15:33:17 -07:00
user-arch.m4 Add build system 2010-08-31 13:41:27 -07:00
user-dracut.m4 Accept udev and dracut paths specified by ./configure 2014-06-11 16:32:57 -07:00
user-frame-larger-than.m4 config: compile test rather than run test 2014-03-20 12:11:57 -07:00
user-libblkid.m4 Fix libblkid support 2013-10-10 16:56:51 -07:00
user-libuuid.m4 Add build system 2010-08-31 13:41:27 -07:00
user-runstatedir.m4 Add defs for makefile installation dir vars 2014-03-31 16:11:13 -07:00
user-systemd.m4 Make systemd-modules-load.service file directory configurable 2014-10-28 09:41:14 -07:00
user-sysvinit.m4 Add systemd unit files for ZFS startup 2014-02-05 12:25:30 -08:00
user-udev.m4 Accept udev and dracut paths specified by ./configure 2014-06-11 16:32:57 -07:00
user-zlib.m4 Add build system 2010-08-31 13:41:27 -07:00
user.m4 Make directory into which mount.zfs is installed configurable 2014-10-28 09:40:59 -07:00
zfs-build.m4 Base init scripts for SYSV systems 2015-05-28 14:14:53 -07:00
zfs-meta.m4 Restrict release number to META version 2014-05-29 19:31:50 -07:00