summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Schwartz2018-10-31 11:21:55 -0400
committerEli Schwartz2018-10-31 11:21:55 -0400
commitec02dcf97ba65909903dafc3f76dd02f1468eef8 (patch)
tree2db1cde28627cdadebe991df34ffea15646e6129
parentdfff50d34e6f7bede7ee96d2a4b21f0373c226e3 (diff)
downloadaur-ec02dcf97ba65909903dafc3f76dd02f1468eef8.tar.gz
rm unneeded files
-rw-r--r--zfs.initcpio.hook119
-rw-r--r--zfs.initcpio.install108
2 files changed, 0 insertions, 227 deletions
diff --git a/zfs.initcpio.hook b/zfs.initcpio.hook
deleted file mode 100644
index 7288ab8018b..00000000000
--- a/zfs.initcpio.hook
+++ /dev/null
@@ -1,119 +0,0 @@
-#
-# WARNING: This script is parsed by ash in busybox at boot time, not bash!
-# http://linux.die.net/man/1/ash
-# https://wiki.ubuntu.com/DashAsBinSh
-# http://www.jpsdomain.org/public/2008-JP_bash_vs_dash.pdf
-#
-ZPOOL_FORCE=""
-ZPOOL_IMPORT_FLAGS=""
-
-zfs_get_bootfs () {
- for zfs_dataset in $(zpool list -H -o bootfs); do
- case ${zfs_dataset} in
- "" | "-")
- # skip this line/dataset
- ;;
- "no pools available")
- return 1
- ;;
- *)
- ZFS_DATASET=${zfs_dataset}
- return 0
- ;;
- esac
- done
- return 1
-}
-
-zfs_mount_handler () {
- if [ "${ZFS_DATASET}" = "bootfs" ] ; then
- if ! zfs_get_bootfs ; then
- # Lets import everything and try again
- zpool import ${ZPOOL_IMPORT_FLAGS} -N -a ${ZPOOL_FORCE}
- if ! zfs_get_bootfs ; then
- die "ZFS: Cannot find bootfs."
- fi
- fi
- fi
-
- local pool="${ZFS_DATASET%%/*}"
- local rwopt_exp="${rwopt:-ro}"
-
- if ! zpool list -H "${pool}" 2>&1 > /dev/null ; then
- if [ ! "${rwopt_exp}" = "rw" ]; then
- msg "ZFS: Importing pool ${pool} readonly."
- ZPOOL_IMPORT_FLAGS="${ZPOOL_IMPORT_FLAGS} -o readonly=on"
- else
- msg "ZFS: Importing pool ${pool}."
- fi
-
- if ! zpool import ${ZPOOL_IMPORT_FLAGS} -N "${pool}" ${ZPOOL_FORCE} ; then
- die "ZFS: Unable to import pool ${pool}."
- fi
- fi
-
- local node="$1"
- local tab_file="${node}/etc/fstab"
- local zfs_datasets="$(zfs list -H -o name -t filesystem -r ${ZFS_DATASET})"
-
- # Mount the root, and any child datasets
- for dataset in ${zfs_datasets}; do
- mountpoint=$(zfs get -H -o value mountpoint "${dataset}")
- case ${mountpoint} in
- "none")
- # skip this line/dataset.
- ;;
- "legacy")
- if [ -f "${tab_file}" ]; then
- if findmnt -snero source -F "${tab_file}" -S "${dataset}" > /dev/null 2>&1; then
- opt=$(findmnt -snero options -F "${tab_file}" -S "${dataset}")
- mnt=$(findmnt -snero target -F "${tab_file}" -S "${dataset}")
- mount -t zfs -o "${opt}" "${dataset}" "${node}${mnt}"
- fi
- fi
- ;;
- *)
- mount -t zfs -o "zfsutil,${rwopt_exp}" "${dataset}" "${node}${mountpoint}"
- ;;
- esac
- done
-}
-
-run_hook() {
- # Force import the pools, useful if the pool has not properly been exported using 'zpool export <pool>'
- [ ! "${zfs_force}" = "" ] && ZPOOL_FORCE="-f"
-
- # Add import directory to import command flags
- [ ! "${zfs_import_dir}" = "" ] && ZPOOL_IMPORT_FLAGS="${ZPOOL_IMPORT_FLAGS} -d ${zfs_import_dir}"
-
- # Wait 15 seconds for ZFS devices to show up
- [ "${zfs_wait}" = "" ] && ZFS_WAIT="15" || ZFS_WAIT="${zfs_wait}"
-
- [ "${root}" = "zfs" ] && mount_handler="zfs_mount_handler"
-
- case ${zfs} in
- "")
- # skip this line/dataset
- ;;
- auto|bootfs)
- ZFS_DATASET="bootfs"
- mount_handler="zfs_mount_handler"
- ;;
- *)
- ZFS_DATASET="${zfs}"
- mount_handler="zfs_mount_handler"
- ;;
- esac
-
- # Allow up to n seconds for zfs device to show up
- for i in $(seq 1 ${ZFS_WAIT}); do
- [ -c "/dev/zfs" ] && break
- sleep 1
- done
-}
-
-run_latehook () {
- zpool import -N -a ${ZPOOL_FORCE}
-}
-
-# vim:set ts=4 sw=4 ft=sh et:
diff --git a/zfs.initcpio.install b/zfs.initcpio.install
deleted file mode 100644
index 3ab0f5266e6..00000000000
--- a/zfs.initcpio.install
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/bash
-
-build() {
- map add_module \
- zavl \
- znvpair \
- zunicode \
- zcommon \
- zfs \
- zpios \
- spl \
- splat
-
- map add_binary \
- arcstat.py \
- dbufstat.py \
- fsck.zfs \
- mount.zfs \
- seq \
- zdb \
- zed \
- zfs \
- zhack \
- zinject \
- zpios \
- zpool \
- zstreamdump \
- ztest \
- splat \
- /lib/udev/vdev_id \
- /lib/udev/zvol_id \
- findmnt
-
- map add_file \
- /lib/udev/rules.d/60-zvol.rules \
- /lib/udev/rules.d/69-vdev.rules \
- /lib/udev/rules.d/90-zfs.rules \
- /lib/libgcc_s.so.1
-
- map add_dir \
- /etc/zfs/zed.d
-
- add_runscript
-
- # allow mount(8) to "autodetect" ZFS
- echo 'zfs' >>"${BUILDROOT}/etc/filesystems"
-
- [[ -f /etc/zfs/zpool.cache ]] && add_file "/etc/zfs/zpool.cache"
- [[ -f /etc/modprobe.d/zfs.conf ]] && add_file "/etc/modprobe.d/zfs.conf"
-}
-
-help() {
- cat<<HELPEOF
-This hook allows you to use ZFS as your root filesystem.
-
-Command Line Setup:
-
- You can append the following arguments to your kernel parameters list. See
- https://wiki.archlinux.org/index.php/Kernel_parameters for more information.
-
- To use ZFS as your boot filesystem:
-
- zfs=bootfs or zfs=auto or root=zfs
-
- To use a pool or dataset:
-
- zfs=<pool/dataset>
-
- To force importing of a ZFS pool:
-
- zfs_force=1
-
- If set to 1, this will use "zpool import -f" when attempting to import
- pools.
-
- To change the seconds of time to wait for ZFS devices to show up at boot:
-
- zfs_wait=30
-
- To search for devices in a directory other than "/dev":
-
- zfs_import_dir=/dev/disk/by-uuid
- or
- zfs_import_dir=/dev/disk/by-partuuid
- or
- zfs_import_dir=/dev/disk/by-path
- etc.
-
- Following initcpio convention, the 'rw' option must be specified to load the
- pool as read/write. Pools are loaded as read only by default.
-
-Examples:
-
- To use bootfs on your pool, use
-
- zfs=bootfs rw
-
- This will setup your root using tank/root zfs pool.
-
- zfs=tank/root rw
-
-If you want to set properties for zfs-on-linux module, you should add them to
-/etc/modprobe.d/zfs.conf and then rebuild initcpio.
-
-HELPEOF
-}
-
-# vim: set ts=4 sw=4 ft=sh et: