From 75e0c79ab60ad93192a1e992ac8a87237039f42f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 15 Feb 2013 16:50:41 -0200 Subject: Adding image bootless subcommand --- share/hydra/bootless | 165 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 127 insertions(+), 38 deletions(-) diff --git a/share/hydra/bootless b/share/hydra/bootless index e49c396..8eb268a 100755 --- a/share/hydra/bootless +++ b/share/hydra/bootless @@ -76,16 +76,6 @@ EOF usbdevice=`echo ${device} | sed -e s/[0-9]\$//g` - # Target device consistency check - if [ ! -b ${device} ]; then - echo "Error: device \"${device}\" not found." - exit 1 - fi - - if [ "`mount | grep ${device}`" != "" ]; then - echo "Error: device \"${device}\" is mounted." - fi - # Issue a warning cat < [arguments]" exit 1 } -# Check for requirements. -for req in parted; do +# Check for requirements +for req in parted kpartx; do hydra_install_package $req done @@ -322,6 +408,9 @@ elif [ "$1" == "update" ]; then elif [ "$1" == "git" ]; then shift hydra_bootless_git $* +elif [ "$1" == "image" ]; then + shift + hydra_bootless_image $* else hydra_bootless_usage fi -- cgit v1.2.3