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: $?)."
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
#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
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: $?)."
# 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
fi
# Copy data
- tmpdir=`mktemp -d`
+ tmpdir=`mktemp --tmpdir=/tmp -d`
hydra_bootless_rsync ${BOOTLESS_DIR} ${tmpdir}/boot
# Make rescue disk