Lines Matching +full:- +full:- +full:remove +full:- +full:all

4 # This script is designed to facilitate in-tree development and testing
5 # by installing symlinks on your system which refer to in-tree helper
7 # exercise all ZFS functionality. By using symbolic links and keeping
8 # the scripts in-tree during development they can be easily modified
15 # --with-mounthelperdir=DIR install mount.zfs in dir [/sbin]
16 # --with-udevdir=DIR install udev helpers [default=check]
17 # --with-udevruledir=DIR install udev rules [default=UDEVDIR/rules.d]
18 # --sysconfdir=DIR install zfs configuration files [PREFIX/etc]
23 if [ -f "${BASE_DIR}/${SCRIPT_COMMON}" ]; then
29 PROG=zfs-helpers.sh
32 REMOVE="no"
49 $0 [-dhirv]
52 Install/remove the ZFS helper utilities.
55 -d Dry run
56 -h Show this message
57 -i Install the helper utilities
58 -r Remove the helper utilities
59 -v Verbose
61 $0 -iv
62 $0 -r
80 REMOVE="yes"
94 if [ "$INSTALL" = "yes" ] && [ "$REMOVE" = "yes" ]; then
95 fail "Specify -i or -r but not both"
98 if [ "$INSTALL" = "no" ] && [ "$REMOVE" = "no" ]; then
99 fail "Either -i or -r must be specified"
102 if [ "$(id -u)" != "0" ] && [ "$DRYRUN" = "no" ]; then
107 fail "Must be run in-tree"
111 echo "--- Configuration ---"
126 # Remove the old symlink if it doesn't point to our workspace.
127 if [ -h "$dst" ] && [ "$(readlink -f """$dst""")" != "$src" ] ; then
128 echo "Removing old symlink: $dst -> $(readlink """$dst""")"
132 if [ -h "$dst" ]; then
134 elif [ -e "$dst" ]; then
136 elif ! [ -e "$src" ]; then
139 msg "ln -s $src $dst"
143 mkdir -p "$DIR" >/dev/null 2>&1
144 ln -s "$src" "$dst"
149 remove() { function
152 if [ -h "$dst" ]; then
157 elif [ -e "$dst" ]; then
169 for rule in "60-zvol.rules" "69-vdev.rules" "90-zfs.rules"; do
182 remove "$INSTALL_MOUNT_HELPER_DIR/mount.zfs"
183 remove "$INSTALL_MOUNT_HELPER_DIR/fsck.zfs"
184 remove "$INSTALL_UDEV_DIR/zvol_id"
185 remove "$INSTALL_UDEV_DIR/vdev_id"
186 remove "$INSTALL_UDEV_RULE_DIR/60-zvol.rules"
187 remove "$INSTALL_UDEV_RULE_DIR/69-vdev.rules"
188 remove "$INSTALL_UDEV_RULE_DIR/90-zfs.rules"
189 remove "$INSTALL_SYSCONF_DIR/zfs/zpool.d"
190 remove "$INSTALL_PKGDATA_DIR/compatibility.d"
191 remove "$INSTALL_PYTHON_DIR/libzfs_core"
192 remove "/lib/libzfs_core.so"
193 remove "/lib/libnvpair.so"