mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-28 10:02:43 +01:00
system/zfs-on-linux: Updated for version 0.6.5.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
e5c3ca2812
commit
98d5bc70a2
3 changed files with 66 additions and 66 deletions
|
@ -28,7 +28,7 @@
|
||||||
LOCKFILE=/var/lock/zfs/zfs
|
LOCKFILE=/var/lock/zfs/zfs
|
||||||
ZFS="/sbin/zfs"
|
ZFS="/sbin/zfs"
|
||||||
ZPOOL="/sbin/zpool"
|
ZPOOL="/sbin/zpool"
|
||||||
ZPOOL_CACHE="/etc/zfs/zpool.cache"
|
UDEVD="/dev/disk/by-id/"
|
||||||
|
|
||||||
# Source zfs configuration.
|
# Source zfs configuration.
|
||||||
[ -r '/etc/default/zfs' ] && . /etc/default/zfs
|
[ -r '/etc/default/zfs' ] && . /etc/default/zfs
|
||||||
|
@ -38,89 +38,89 @@ ZPOOL_CACHE="/etc/zfs/zpool.cache"
|
||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
[ -f "$LOCKFILE" ] && return 3
|
[ -f "$LOCKFILE" ] && return 3
|
||||||
|
|
||||||
# Requires selinux policy which has not been written.
|
# Requires selinux policy which has not been written.
|
||||||
if [ -r "/selinux/enforce" ] &&
|
if [ -r "/selinux/enforce" ] &&
|
||||||
[ "$(cat /selinux/enforce)" = "1" ]; then
|
[ "$(cat /selinux/enforce)" = "1" ]; then
|
||||||
|
|
||||||
echo "SELinux ZFS policy required"
|
echo "SELinux ZFS policy required"
|
||||||
return 4
|
return 4
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Delay until all required block devices are present.
|
# Delay until all required block devices are present.
|
||||||
udevadm settle
|
udevadm settle
|
||||||
|
|
||||||
# Load the zfs module stack
|
# Load the zfs module stack
|
||||||
/sbin/modprobe zfs
|
/sbin/modprobe zfs
|
||||||
|
|
||||||
# Ensure / exists in /etc/mtab, if not update mtab accordingly.
|
# Ensure / exists in /etc/mtab, if not update mtab accordingly.
|
||||||
# This should be handled by rc.sysinit but lets be paranoid.
|
# This should be handled by rc.sysinit but lets be paranoid.
|
||||||
awk '$2 == "/" { exit 1 }' /etc/mtab
|
awk '$2 == "/" { exit 1 }' /etc/mtab
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
if [ "$RETVAL" -eq 0 ]; then
|
if [ "$RETVAL" -eq 0 ]; then
|
||||||
/bin/mount -f /
|
/bin/mount -f /
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Import all pools described by the cache file, and then mount
|
# Import all pools, and then mount
|
||||||
# all filesystem based on their properties.
|
# all filesystem based on their properties.
|
||||||
if [ -f "$ZPOOL_CACHE" ] ; then
|
echo "Importing ZFS pools"
|
||||||
echo "Importing ZFS pools"
|
"$ZPOOL" import -d "$UDEVD" -f -aN 2>/dev/null
|
||||||
"$ZPOOL" import -fc "$ZPOOL_CACHE" -aN 2>/dev/null
|
|
||||||
|
|
||||||
echo "Mounting ZFS filesystems"
|
echo "Mounting ZFS filesystems"
|
||||||
"$ZFS" mount -a
|
"$ZFS" mount -a
|
||||||
|
|
||||||
echo "Exporting ZFS filesystems"
|
echo "Exporting ZFS filesystems"
|
||||||
"$ZFS" share -a
|
"$ZFS" share -a
|
||||||
fi
|
|
||||||
|
|
||||||
touch "$LOCKFILE"
|
touch "$LOCKFILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
[ ! -f "$LOCKFILE" ] && return 3
|
[ ! -f "$LOCKFILE" ] && return 3
|
||||||
|
|
||||||
echo "Unmounting ZFS filesystems"
|
echo "Unmounting ZFS filesystems"
|
||||||
"$ZFS" umount -a
|
"$ZFS" umount -a
|
||||||
|
|
||||||
rm -f "$LOCKFILE"
|
rm -f "$LOCKFILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
status()
|
status()
|
||||||
{
|
{
|
||||||
[ ! -f "$LOCKFILE" ] && return 3
|
[ ! -f "$LOCKFILE" ] && return 3
|
||||||
|
|
||||||
"$ZPOOL" status && echo "" && "$ZPOOL" list
|
"$ZPOOL" status && echo "" && "$ZPOOL" list
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
start
|
start
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
stop
|
stop
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
status
|
status
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
;;
|
;;
|
||||||
condrestart)
|
condrestart)
|
||||||
if [ -f "$LOCKFILE" ]; then
|
if [ -f "$LOCKFILE" ]; then
|
||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
|
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit $RETVAL
|
exit $RETVAL
|
||||||
|
|
||||||
|
# vim: set ts=4 sts=4 sw=4 expandtab textwidth=78:
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
# Slackware build script for zfs-on-linux
|
# Slackware build script for zfs-on-linux
|
||||||
|
|
||||||
# Copyright 2013-2014 Petr Hejl - Czech Republic
|
|
||||||
# Copyright 2015 Kevin Paulus <goarilla@gmail.com>, Belgium
|
# Copyright 2015 Kevin Paulus <goarilla@gmail.com>, Belgium
|
||||||
|
# Copyright 2013-2014 Petr Hejl - Czech Republic
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use of this script, with or without modification, is
|
# Redistribution and use of this script, with or without modification, is
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
PRGNAM=zfs-on-linux
|
PRGNAM=zfs-on-linux
|
||||||
SRCNAM=zfs
|
SRCNAM=zfs
|
||||||
VERSION=${VERSION:-0.6.5}
|
VERSION=${VERSION:-0.6.5.1}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
PRGNAM="zfs-on-linux"
|
PRGNAM="zfs-on-linux"
|
||||||
VERSION="0.6.5"
|
VERSION="0.6.5.1"
|
||||||
HOMEPAGE="http://zfsonlinux.org"
|
HOMEPAGE="http://zfsonlinux.org"
|
||||||
DOWNLOAD="http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/zfs-0.6.5.tar.gz"
|
DOWNLOAD="http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/zfs-0.6.5.1.tar.gz"
|
||||||
MD5SUM="76a3675a56acce7c9fd36578173304e4"
|
MD5SUM="0421551f728c1fd4239bdd9932ba2c52"
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
REQUIRES="spl-solaris"
|
REQUIRES="spl-solaris"
|
||||||
|
|
Loading…
Reference in a new issue