Skip to content

Commit 02efd61

Browse files
committed
nc-restore: check btrfs command
1 parent 4a0885c commit 02efd61

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bin/ncp/BACKUPS/nc-restore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ if [[ $( ls "$TMPDIR" | wc -l ) -eq $NUMFILES ]]; then
110110
echo "restore datadir to $DATADIR..."
111111
112112
mkdir -p "$DATADIR"
113-
[[ "$( stat -fc%T "$DATADIR" )" == "btrfs" ]] && {
113+
[[ "$( stat -fc%T "$DATADIR" )" == "btrfs" ]] && which btrfs &>/dev/null && {
114114
rmdir "$DATADIR" || exit 1
115115
btrfs subvolume create "$DATADIR" || exit 1
116116
}

update.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ EOF
170170

171171
# update nc-backup
172172
install_app nc-backup
173+
install_app nc-restore
173174

174175
# create UPDATES section
175176
updates_dir=/usr/local/bin/ncp/UPDATES

0 commit comments

Comments
 (0)