summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydra/bootless15
1 files changed, 8 insertions, 7 deletions
diff --git a/share/hydra/bootless b/share/hydra/bootless
index 819a464..3e85655 100755
--- a/share/hydra/bootless
+++ b/share/hydra/bootless
@@ -96,7 +96,7 @@ EOF
hydra_bootless_device ${usbdevice} ${device}
# Mount
- tmpdir=`mktemp -d`
+ tmpdir=`mktemp --tmpdir=/tmp -d`
$sudo mount ${device} ${tmpdir}
if [ $? != 0 ]; then
echo "Error: failed to mount \"${device}\" filesystem in \"${tmpdir}\" (errno: $?)."
@@ -115,7 +115,9 @@ EOF
fi
(
- cd ${tmpdir}/boot && git annex init && git config annex.sshcaching false && git annex untrust here && git annex sync && git annex get .
+ cd ${tmpdir}/boot && $sudo git annex init && \
+ $sudo git config annex.sshcaching false && \
+ $sudo git annex untrust here && $sudo git annex sync && $sudo git annex get .
)
if [ $? != 0 ]; then
@@ -135,8 +137,7 @@ EOF
#quit" | grub --device-map=${devicemap} --batch
# Grub 2
- #$sudo grub-install --root-directory=${tmpdir} ${usbdevice} --force
- $sudo grub-install --boot-directory=${tmpdir} --allow-floppy --force ${usbdevice}
+ $sudo grub-install --boot-directory=${tmpdir} --force ${usbdevice}
if [ $? != 0 ]; then
echo "Error: grub-install failed (errno: $?)."
exit 1
@@ -181,7 +182,7 @@ function hydra_bootless_update {
exit 1
fi
- tmpdir=`mktemp -d`
+ tmpdir=`mktemp --tmpdir=/tmp -d`
$sudo mount ${device} ${tmpdir}
if [ $? != 0 ]; then
echo "Error: failed to mount \"${device}\" filesystem in \"${tmpdir}\" (errno: $?)."
@@ -191,7 +192,7 @@ function hydra_bootless_update {
# Copy data
if [ -d "${tmpdir}/boot/.git" ]; then
#( cd ${tmpdir}/boot && $sudo git pull origin master )
- ( cd ${tmpdir}/boot && $sudo git annex sync && git annex get . )
+ ( cd ${tmpdir}/boot && $sudo git annex sync && $sudo git annex get . )
else
hydra_bootless_rsync ${BOOTLESS_DIR} ${tmpdir}/boot
fi
@@ -373,7 +374,7 @@ function hydra_bootless_image {
fi
# Copy data
- tmpdir=`mktemp -d`
+ tmpdir=`mktemp --tmpdir=/tmp -d`
hydra_bootless_rsync ${BOOTLESS_DIR} ${tmpdir}/boot
# Make rescue disk