mirror of https://github.com/CIRCL/Circlean
Fix support of multi-partitions keys.
parent
5521fa26ba
commit
b49e98af69
|
@ -6,7 +6,7 @@ USERNAME='kitten'
|
|||
HOME="/home/${USERNAME}"
|
||||
MUSIC="/opt/midi/"
|
||||
|
||||
TMP="/tmp/"
|
||||
TMP="/tmp"
|
||||
|
||||
# Paths used in multiple scripts
|
||||
SRC="${TMP}/src"
|
||||
|
@ -21,6 +21,7 @@ SUDO='/usr/bin/sudo'
|
|||
ID=`/usr/bin/id -u`
|
||||
SYNC='/bin/sync'
|
||||
TIMIDITY='/usr/bin/timidity'
|
||||
MOUNT='/bin/mount'
|
||||
|
||||
# root commands.
|
||||
# To avoid the risk that an attacker use -o remount on mount and other nasty
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
#set -x
|
||||
set -x
|
||||
|
||||
source ./constraint.sh
|
||||
if ! [ "${ID}" -ge "1000" ]; then
|
||||
|
@ -37,7 +37,7 @@ if [ ! -b ${DEV_SRC} ]; then
|
|||
fi
|
||||
# Find the partition names on the source device
|
||||
DEV_PARTITIONS=`ls "${DEV_SRC}"* | grep "${DEV_SRC}[1-9][0-6]*" || true`
|
||||
if [ -z ${DEV_PARTITIONS} ]; then
|
||||
if [ -z "${DEV_PARTITIONS}" ]; then
|
||||
echo "${DEV_SRC} does not have any partitions."
|
||||
exit
|
||||
fi
|
||||
|
@ -86,7 +86,7 @@ for partition in ${DEV_PARTITIONS}
|
|||
do
|
||||
# Processing a partition
|
||||
echo "Processing partition: ${partition}"
|
||||
if ${MOUNT}|grep ${SRC}; then
|
||||
if [ `${MOUNT} | grep -c ${SRC}` -ne 0 ]; then
|
||||
${SUDO} ${UMOUNT} ${SRC}
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue