-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path55maratona-fixes
80 lines (69 loc) · 1.89 KB
/
55maratona-fixes
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#! /bin/sh
# This script is distributed with Maratona Linux under the terms of GPLv2
PREREQ=""
DESCRIPTION="Maratona fixes..."
prereqs()
{
echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
. /scripts/casper-functions
log_begin_msg "$DESCRIPTION"
#make snap work after reboot
rm -rf /cow/upper/var/lib/snapd
#make sure there is something in icpc home
if [[ ! -d ${rootmnt}/home/icpc ]]; then
mkdir -p ${rootmnt}/home/icpc
touch ${rootmnt}/home/icpc/.clean-home
fi
if [[ ! -d ${rootmnt}/home/latam-admin ]]; then
cp -a ${rootmnt}/rofs/home/latam-admin ${rootmnt}/home/
fi
if grep -q "factoryreset" /proc/cmdline; then
for i in dev dev/pts sys proc; do
mount --bind /$i ${rootmnt}/$i
done
chroot ${rootmnt} bash /usr/share/maratona-casper/ml-factoryreset.sh
RET=$?
if [[ "$RET" == "0" ]]; then
echo "Removing files..."
rm -rf /cow/*
rm -rf ${rootmnt}/home/*
sleep 1
fi
reboot
while :; do sleep 60; done
fi
if grep -q "mlinstall" /proc/cmdline; then
for i in dev dev/pts sys proc; do
mount --bind /$i ${rootmnt}/$i
done
chroot ${rootmnt} bash /usr/share/maratona-casper/ml-install.sh
echo "Please remove Install Media and press ENTER"
echo "Please remove Install Media and press ENTER"
echo "Please remove Install Media and press ENTER"
echo "Please remove Install Media and press ENTER"
echo "Please remove Install Media and press ENTER"
echo "Please remove Install Media and press ENTER"
echo "Please remove Install Media and press ENTER"
echo "Please remove Install Media and press ENTER"
echo "Please remove Install Media and press ENTER"
echo "Please remove Install Media and press ENTER"
read
reboot
while :; do sleep 60; done
fi
if grep -q "mlshell" /proc/cmdline; then
sh
echo "Please remove Install Media and press ENTER"
read
reboot
while :; do sleep 60; done
fi
log_end_msg