#!/bin/sh set -- $1 fs=$1 mp=$2 type=$3 options=$4 dump=$5 pass=$6 case $type in btrfs) if [ "$mp" = "/" ]; then mount -t btrfs ${options:+-o "$options"} $fs /target/ || exit 1 btrfs subvolume create /target/@rootfs || exit 1 umount /target || exit 1 mount -t btrfs ${options:+-o "$options,subvol=@rootfs"} $fs /target || exit 1 else mount -t btrfs ${options:+-o "$options"} $fs /target"$mp" || exit 1 fi echo "umount /target$mp" exit 0 ;; esac exit 1