Added btrfs snapshot command

This commit is contained in:
Geoff Murphy 2024-11-05 14:54:40 +11:00
parent 5d5b1c16d3
commit b7d56506f8
2 changed files with 23 additions and 7 deletions

View file

@ -25,13 +25,17 @@ fake () {
#--------[ Init/System Management ]--------#
elif [ "$1" == "status" ]; then _fake_manager_system_status $@;
elif [ "$1" == "start" ]; then _fake_manager_system_start $@;
elif [ "$1" == "stop" ]; then _fake_manager_system_stop $@;
elif [ "$1" == "restart" ]; then _fake_manager_system_restart $@;
elif [ "$1" == "enable" ]; then _fake_manager_system_enable $@;
elif [ "$1" == "disable" ]; then _fake_manager_system_disable $@;
elif [ "$1" == "flush" ]; then _fake_utils_linux_flushcache $@;
elif [ "$1" == "status" ]; then _fake_manager_system_status $@;
elif [ "$1" == "start" ]; then _fake_manager_system_start $@;
elif [ "$1" == "stop" ]; then _fake_manager_system_stop $@;
elif [ "$1" == "restart" ]; then _fake_manager_system_restart $@;
elif [ "$1" == "enable" ]; then _fake_manager_system_enable $@;
elif [ "$1" == "disable" ]; then _fake_manager_system_disable $@;
#--------[ Other System Functions ]--------#
elif [ "$1" == "flush" ]; then _fake_utils_linux_flushcache $@;
elif [ "$1" == "snapshots" ]; then _fake_utils_linux_snapshots $@;

View file

@ -0,0 +1,12 @@
#!/usr/bin/env sh
#--------[ Show Snapshots ]--------#
_fake_utils_linux_snapshots () {
if [ "$(command -v snapper)" ]; then
snapper list
else
_fake_layout_message "BTRFS Snapper: Not Installed"
fi
}