blob: a4d3534d61cb2fde7c0c716fc05b4e9bf75731dc (
plain)
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
|
#!/bin/sh
#
# RW update script
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PATCH_DIR=/usr/share/upgrade/scripts
RESULT_FILE=/upgrade_result
RUN=/bin/sh
# Change to normal mode from next booting
rm /system-update
rm /usr/lib/udev/rules.d/99-sdb-switch.rules
# Execute update scripts
if [ ! -d ${PATCH_DIR} ]
then
echo "FAIL: Upgrade directory does not exist" > ${RESULT_FILE}
else
PATCHES=`/bin/ls ${PATCH_DIR}`
for PATCH in ${PATCHES}; do
${RUN} ${PATCH_DIR}/${PATCH}
done
${RUN} /usr/share/upgrade/update-post.sh
echo "SUCCESS: Upgrade successfully finished" > ${RESULT_FILE}
fi
# Reboot
systemctl reboot
|