summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-09-02 22:49:17 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-09-02 22:49:17 -0300
commit65a78e647d1c45bd809ba8ed0eb68360a4c4cde8 (patch)
tree147fda7a205a0df8c4d5557ef08ceff316ece65f /share
parenta8f529abf4323a5475f27bff5cc3451e5713d6b3 (diff)
downloadhydra-65a78e647d1c45bd809ba8ed0eb68360a4c4cde8.tar.gz
hydra-65a78e647d1c45bd809ba8ed0eb68360a4c4cde8.tar.bz2
Bootless: misc fixes
Diffstat (limited to 'share')
-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