diff options
author | Markus Reichelt <slackbuilds@mareichelt.de> | 2022-10-14 04:40:58 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-10-15 10:47:36 +0700 |
commit | 303756abe6041eee45905e88a75b59269fb526a1 (patch) | |
tree | b2f945a3f9775bf9b30c6f8a5bf0388001c9ac25 /system/zfs-on-linux/rc.zfs | |
parent | 6bd278c0e8ac141bfa2f1ba619b35f6cfe46f155 (diff) |
system/zfs-on-linux: Removed (renamed openzfs).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/zfs-on-linux/rc.zfs')
-rw-r--r-- | system/zfs-on-linux/rc.zfs | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/system/zfs-on-linux/rc.zfs b/system/zfs-on-linux/rc.zfs deleted file mode 100644 index 7df2057908494..0000000000000 --- a/system/zfs-on-linux/rc.zfs +++ /dev/null @@ -1,127 +0,0 @@ -#!/bin/bash -# -# zfs This script will mount/umount the zfs filesystems. -# -# chkconfig: 2345 01 99 -# description: This script will mount/umount the zfs filesystems during -# system boot/shutdown. Configuration of which filesystems -# should be mounted is handled by the zfs 'mountpoint' and -# 'canmount' properties. See the zfs(8) man page for details. -# It is also responsible for all userspace zfs services. -# -### BEGIN INIT INFO -# Provides: zfs -# Required-Start: $local_fs -# Required-Stop: $local_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Should-Stop: -# Short-Description: Mount/umount the zfs filesystems -# Description: ZFS is an advanced filesystem designed to simplify managing -# and protecting your data. This service mounts the ZFS -# filesystems and starts all related zfs services. -### END INIT INFO - -# Source function library. -. /etc/rc.d/init.d/functions - -LOCKFILE=/var/lock/zfs/zfs -ZFS="/sbin/zfs" -ZPOOL="/sbin/zpool" -UDEVD="/dev/disk/by-id/" - -# Source zfs configuration. -[ -r '/etc/default/zfs' ] && . /etc/default/zfs - -[ -x "$ZPOOL" ] || exit 1 -[ -x "$ZFS" ] || exit 2 - -start() -{ - [ -f "$LOCKFILE" ] && return 3 - - # Requires selinux policy which has not been written. - if [ -r "/selinux/enforce" ] && - [ "$(cat /selinux/enforce)" = "1" ]; then - - echo "SELinux ZFS policy required" - return 4 - fi - - # Delay until all required block devices are present. - udevadm settle - - # Load the zfs module stack - /sbin/modprobe zfs - - # Ensure / exists in /etc/mtab, if not update mtab accordingly. - # This should be handled by rc.sysinit but lets be paranoid. - awk '$2 == "/" { exit 1 }' /etc/mtab - RETVAL=$? - if [ "$RETVAL" -eq 0 ]; then - /bin/mount -f / - fi - - # Import all pools, and then mount - # all filesystem based on their properties. - echo "Importing ZFS pools" - "$ZPOOL" import -d "$UDEVD" -f -aN 2>/dev/null - - echo "Mounting ZFS filesystems" - "$ZFS" mount -a - - echo "Exporting ZFS filesystems" - "$ZFS" share -a - - mkdir -p $(dirname $LOCKFILE) - touch "$LOCKFILE" -} - -stop() -{ - [ ! -f "$LOCKFILE" ] && return 3 - - echo "Unmounting ZFS filesystems" - "$ZFS" umount -a - - rm -f "$LOCKFILE" -} - -status() -{ - [ ! -f "$LOCKFILE" ] && return 3 - - "$ZPOOL" status && echo "" && "$ZPOOL" list -} - -case "$1" in - start) - start - RETVAL=$? - ;; - stop) - stop - RETVAL=$? - ;; - status) - status - RETVAL=$? - ;; - restart) - stop - start - ;; - condrestart) - if [ -f "$LOCKFILE" ]; then - stop - start - fi - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart}" - ;; -esac - -exit $RETVAL - -# vim: set ts=4 sts=4 sw=4 expandtab textwidth=78: |