Skip to content

Commit 6d5b84b

Browse files
committed
fix indent
1 parent 0e09169 commit 6d5b84b

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

log2ram

+15-13
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ remountRW() {
1515
RESU=$?
1616
INITIAL_STATUS=ro
1717
if [ "$RESU" != "0" ] ; then
18-
mount -o remount,rw ${HDD_LOG}
18+
mount -o remount,rw ${HDD_LOG}
1919
else
20-
INITIAL_STATUS=rw
21-
rm $HDD_LOG/$$ 2>/dev/null
20+
INITIAL_STATUS=rw
21+
rm $HDD_LOG/$$ 2>/dev/null
2222
fi
2323
# for return
2424
echo $INITIAL_STATUS
@@ -91,14 +91,14 @@ make_log_dir () {
9191
# if create mount failed, try to remount in rw the parent directory
9292
# and restore original status
9393
if [ ! -d $HDD_LOG/ ] ; then
94-
mkdir $HDD_LOG/ 2>/dev/null /dev/null
95-
RESU=$?
96-
if [ "$RESU" -ne "0" ] ; then
97-
MOUNT_POINT=$(findmnt -T ` dirname $HDD_LOG/ ` -n --raw | cut -d ' ' -f 1 )
98-
mount -o remount,rw ${MOUNT_POINT}
99-
sleep 0.1
100-
mkdir $HDD_LOG/
101-
mount -o remount,ro ${MOUNT_POINT}
94+
mkdir $HDD_LOG/ 2>/dev/null /dev/null
95+
RESU=$?
96+
if [ "$RESU" -ne "0" ] ; then
97+
MOUNT_POINT=$(findmnt -T ` dirname $HDD_LOG/ ` -n --raw | cut -d ' ' -f 1 )
98+
mount -o remount,rw ${MOUNT_POINT}
99+
sleep 0.1
100+
mkdir $HDD_LOG/
101+
mount -o remount,ro ${MOUNT_POINT}
102102
fi
103103
fi
104104
}
@@ -112,8 +112,10 @@ case "$1" in
112112
RAM_LOG=$i
113113
HDD_LOG=$PATH_FIRST_PART/hdd.$PATH_LAST_PART
114114
LOG2RAM_LOG="${RAM_LOG}/${LOG_NAME}"
115-
make_log_dir
116-
mount --bind $RAM_LOG/ $HDD_LOG/
115+
116+
make_log_dir
117+
118+
mount --bind $RAM_LOG/ $HDD_LOG/
117119
mount --make-private $HDD_LOG/
118120
wait_for $HDD_LOG
119121

0 commit comments

Comments
 (0)