Skip to content

Commit

Permalink
fix: wrong BTRFSVOL2 check again
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed May 30, 2017
1 parent ad1c089 commit 398f1aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions subvolboot2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ else
fi
## check default subvolume 2
BTRFSVOL2=$(btrfs subvolume show '/' | grep -c "root")
if [ "$BTRFSVOL2" = "1" ]; then
if [ "$BTRFSVOL2" = "0" ]; then
: # dummy
else
echo "[Error] won't create new subvolume snapshots inside other subvolume snapshots"
Expand Down Expand Up @@ -292,8 +292,8 @@ else
exit 1
fi
## check default subvolume 2
BTRFSVOL2=$(btrfs subvolume show / | grep -c "root")
if [ "$BTRFSVOL2" = "1" ]; then
BTRFSVOL2=$(btrfs subvolume show '/' | grep -c "root")
if [ "$BTRFSVOL2" = "0" ]; then
: # dummy
else
echo "[Error] won't delete the current subvolume snapshot inside another one"
Expand Down

0 comments on commit 398f1aa

Please sign in to comment.