Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 0ea52af

Browse files
authored
Merge pull request #7 from rbalint/master
Small fixes
2 parents f94a5dd + 83c6d41 commit 0ea52af

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

bin/emrk-factory-reset

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fi
4343
echo "Do you want to make a backup copy of your config?"
4444
yesno
4545

46-
if [ $? == 0 ]; then
46+
if [ $? = 0 ]; then
4747
cp $ROOT_MNT_DIR/$CONFIG $ROOT_MNT_DIR/config.boot.emrk-backup
4848
echo "Saved a backup copy to /config/config.boot.emrk-backup"
4949
fi

bin/emrk-reinstall

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
#
2121
#
2222

23+
set -e
24+
2325
# It's time to reinstall EdgeOS!
2426
# EdgeOS won't reinstall itself!
2527

26-
DEV=$EMRK_DEV || /dev/sda
28+
DEV=${EMRK_DEV:-/dev/sda}
2729
BOOT=${DEV}1
2830
ROOT=${DEV}2
2931
BOOT_MNT_DIR=/mnt/boot
@@ -116,7 +118,7 @@ mkdir -p $TMP_DIR
116118
while [ -z "$TAR_PATH" ]; do
117119
read -p "Enter EdgeOS image url: " URL
118120
curl -o $ROOT_MNT_DIR/tmp/edgeos.tar $URL
119-
if [ $? == 0 ]; then
121+
if [ $? = 0 ]; then
120122
TAR_PATH=$TMP_DIR/edgeos.tar
121123
break
122124
else

bin/emrk-remove-user-data

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ echo "Do you want to continue?"
3333

3434
$YESNO
3535

36-
if [ $? == 1 ]; then
36+
if [ $? = 1 ]; then
3737
exit 0
3838
fi
3939

0 commit comments

Comments
 (0)