Skip to content

Commit

Permalink
Added repair functions
Browse files Browse the repository at this point in the history
  • Loading branch information
VentGrey committed Mar 30, 2020
1 parent efff526 commit d88135e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions breeds/storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ function help {
Commands:
ls: lists all available disks
status: shows information about the consulted device
status: shows information about the consulted device (eg: /dev/sdx)
fs: lists all available filesystems
unplug: unmounts ALL volumes [potentially dangerous]
check: Check & Verify all disks available
repair: Repairs a given volume
repair: Repairs a given volume (eg: /dev/sdx)
help: show this message
__EOF__
Expand Down Expand Up @@ -80,14 +80,19 @@ function check {
done
}

function repair {
sudo umount "$1"
sudo fsck -y "$1"
}

case $1 in
help) help ;;
ls) shift list ;;
status) shift status ;;
fs) shift filesys ;;
unplug) shift unplug ;;
check) shift check ;;
repair) shift repair "$@" ;;
repair) shift repair "$@";;
*) help ;;

esac
Expand Down

0 comments on commit d88135e

Please sign in to comment.