Commit 50a00f2f authored by Jeff Bilyk's avatar Jeff Bilyk

setup-{apklbu, bootable, chrony, sshd}: replace double equals in if statements with single equals

parent 70b1a671
......@@ -27,10 +27,10 @@ while getopts "im:h" opt; do
esac
done
if [ "$VERBOSE" == "1" ]; then
if [ "$VERBOSE" = "1" ]; then
echo "Setup apk caching and lbu? (y/N)"
default_read setupapklbu
if [ "$setupapklbu" == "N" ] || [ "$setupapklbu" == "n" ]; then
if [ "$setupapklbu" = "N" ] || [ "$setupapklbu" = "n" ]; then
exit 0
fi
fi
......@@ -49,11 +49,11 @@ fi
readwritestatus="`echo $mountstatus | awk -F '(' '{print $2}' | awk -F ',' '{print $1}'`"
if [ "$readwritestatus" == "ro" ]; then
if [ "$readwritestatus" = "ro" ]; then
rewrite=1
fi
if [ "$rewrite" == 1 ]; then
if [ "$rewrite" = 1 ]; then
mount -o remount,rw /media/${MOUNTPOINT} || die "Failed to remount media rw"
fi
......@@ -75,6 +75,6 @@ LBU_MEDIA=$MOUNTPOINT
EOF
lbu package /media/"$MOUNTPOINT" || die "Failed to lbu apkovl on /media/${MOUNTPOINT}"
sync
if [ "$rewrite" == 1 ]; then
if [ "$rewrite" = 1 ]; then
mount -o remount,ro /media/${MOUNTPOINT} || die "Failed to remount media ro"
fi
......@@ -117,7 +117,7 @@ elif [ -b "$dest" ]; then
fi
# Check for RO mounting
if [ "`grep \"$destdir\" /proc/mount | grep 'ro,'`" == "ro" ]; then
if [ "`grep \"$destdir\" /proc/mount | grep 'ro,'`" = "ro" ]; then
remountneeded="Y"
mount -o remount,rw "$destdir"
fi
......@@ -261,7 +261,7 @@ else
echo "Warning: Could not find the parent device for $dest"
fi
if [ "$remountneeded" == "Y" ]; then
if [ "$remountneeded" = "Y" ]; then
mount -o remount,ro "$destdir"
fi
......
......@@ -27,7 +27,7 @@ done
if [ "$PROMPT" != "0" ]; then
echo "Setup chrony for NTP? (y/N)"
default_read setupchrony "N"
if [ "$setupchrony" == "N" ] || [ "$setupchrony" == "n" ]; then
if [ "$setupchrony" = "N" ] || [ "$setupchrony" = "n" ]; then
exit 0
fi
fi
......
......@@ -31,7 +31,7 @@ done
if [ "$PROMPT" != "0" ]; then
echo "Setup sshd? (y/N)"
default_read setupsshd "N"
if [ "$setupsshd" == "N" ] || [ "$setupsshd" == "n" ]; then
if [ "$setupsshd" = "N" ] || [ "$setupsshd" = "n" ]; then
exit 0
fi
fi
......@@ -46,7 +46,7 @@ else
apk add openssh -q
fi
if [ "$PASSWORDAUTH" == "N"]; then
if [ "$PASSWORDAUTH" = "N"]; then
printf "PasswordAuthentication no\nUseDNS no\n" >> /etc/ssh/sshd_config
else
printf "UseDNS no\n" >> /etc/ssh/sshd_config
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment