-
Notifications
You must be signed in to change notification settings - Fork 0
/
mountrw
executable file
·63 lines (49 loc) · 1.05 KB
/
mountrw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
#
# Remount the system in RW mode.
# Licensed under the terms GPL V2.
#
CONFDIR=/etc/flashybrid
is_mounted ()
{
grep -q " $1 " /proc/mounts
}
ENABLED=no
if [ -e /etc/default/flashybrid ]; then
. /etc/default/flashybrid
fi
if [ "$ENABLED" != yes ]; then
# we ignore the setups in which flash hybrid is not configured
echo "Flashybrid system: disabled."
exit
fi
if [ -e $CONFDIR/config ]; then
. $CONFDIR/config
else
# we ignore quietly the setups in which flash hybrid is not configured
exit
fi
if ! is_mounted "$RAMMOUNT" ; then
echo "Flashybrid is not started. Ignoring"
exit
fi
if [ -z "$FLASHMOUNT" ]; then
exit 1
fi
echo -n "Mounting flashybrid system RW..."
# if verbose, make a new line feed,
# this way the first message will get a new line
if [ "$VERBOSE" = "yes" ]; then
echo " "
fi
for dir in ${FLASHMOUNT}; do
if [ "$VERBOSE" = "yes" ]; then
echo -n "Remounting $dir"
fi
# Remount every $dir read-write
mount -o remount,rw $dir
if [ "$VERBOSE" = "yes" ]; then
echo "."
fi
done
echo "done."