summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-10-05 14:32:32 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-10-05 14:32:32 -0300
commit78945d56a0c78d0cef891f5797ef9807a4b298b2 (patch)
tree5228326d410a8aefe8956733efdd5edd0ce8a276 /share
parentdbe2deb6325bba567b6f151abeddea3abb4a9bff (diff)
downloadhydra-78945d56a0c78d0cef891f5797ef9807a4b298b2.tar.gz
hydra-78945d56a0c78d0cef891f5797ef9807a4b298b2.tar.bz2
Misc fixes
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydra/bootless51
1 files changed, 28 insertions, 23 deletions
diff --git a/share/hydra/bootless b/share/hydra/bootless
index a1fa76e..5bf6ed4 100755
--- a/share/hydra/bootless
+++ b/share/hydra/bootless
@@ -18,6 +18,7 @@
source $APP_BASE/lib/hydra/functions || exit 1
hydra_config_load
+# Set bootless folder
function hydra_bootless_folder {
# Check for a bootless repository
if [ -e "$HYDRA_FOLDER/bootless" ]; then
@@ -30,6 +31,7 @@ function hydra_bootless_folder {
fi
}
+# Make a boot device
function hydra_bootless_make {
# Set folder
hydra_bootless_folder
@@ -51,6 +53,7 @@ partition and make the device bootable.
Press any key to continue, or ^C to abort.
EOF
+
read tmp
# Git repo consistency check
@@ -87,6 +90,7 @@ EOF
If you continue, all data in device "${device}" will be destroyed!
EOF
+
echo -n "Are you sure you want to continue? Type uppercase \"YES\": "
read go
@@ -149,21 +153,23 @@ function hydra_bootless_init {
if [ ! -z "$1" ]; then
# Clone from url
git clone $1 $HYDRA_FOLDER/bootless
+ exit $?
+ fi
+
+ # Create a fresh repository
+ mkdir -p $HYDRA_FOLDER/bootless/{default,custom,grub}
+ mkdir -p $HYDRA_FOLDER/bootless/default/{debian,memtest,ubuntu}
+ ( cd $HYDRA_FOLDER/bootless && ln -s . boot)
+
+ if [ -f "/boot/memtest86+.bin" ]; then
+ cp /boot/memtest86+.bin $HYDRA_FOLDER/bootless/default/memtest
else
- # Create a fresh repository
- mkdir -p $HYDRA_FOLDER/bootless/{default,custom,grub}
- mkdir -p $HYDRA_FOLDER/bootless/default/{debian,memtest,ubuntu}
- ( cd $HYDRA_FOLDER/bootless && ln -s . boot)
-
- if [ -f "/boot/memtest86+.bin" ]; then
- cp /boot/memtest86+.bin $HYDRA_FOLDER/bootless/default/memtest
- else
- echo "No memtest image found. Please install memtest86+ package"
- echo "and manually copy /boot/memtest86+.bin if you want memtest support"
- fi
-
- # Grub configuration
- cat > $HYDRA_FOLDER/bootless/grub/grub.cfg <<-EOF
+ echo "No memtest image found. Please install memtest86+ package"
+ echo "and manually copy /boot/memtest86+.bin if you want memtest support"
+ fi
+
+ # Grub configuration
+ cat > $HYDRA_FOLDER/bootless/grub/grub.cfg <<-EOF
# This is grub.cfg for use with Bootless Management System
### BEGIN header ###
@@ -198,16 +204,15 @@ set menu_color_highlight=yellow/red
### END debian_theme ###
EOF
- # Initialize git repository
- (
- cd $HYDRA_FOLDER/bootless
- git init
- git add .
- git commit -a -m "Initial import"
- )
+ # Initialize git repository
+ (
+ cd $HYDRA_FOLDER/bootless
+ git init
+ git add .
+ git commit -a -m "Initial import"
+ )
- echo "Now add your boot images and edit $HYDRA_FOLDER/bootless/grub/grub.cfg to suit your needs."
- fi
+ echo "Now add your boot images and edit $HYDRA_FOLDER/bootless/grub/grub.cfg to suit your needs."
}
# Git wrapper