summaryrefslogtreecommitdiff
path: root/upgrade/update.sh
blob: ab46c9a5c35be119d82656cccbbf6c34c8756256 (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
#!/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

rm /system-update

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

systemctl reboot