blob: 1aeb2e91bd6b44cff3f1497a26481a8e419fa953 (
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
|
#!/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
echo "SUCCESS: Upgrade successfully finished" > ${RESULT_FILE}
fi
# Reboot
systemctl reboot
|