diff --git a/files/board/arpl/overlayfs/etc/init.d/S41dhcpcd b/files/board/arpl/overlayfs/etc/init.d/S41dhcpcd index 8971e162..439628f1 100755 --- a/files/board/arpl/overlayfs/etc/init.d/S41dhcpcd +++ b/files/board/arpl/overlayfs/etc/init.d/S41dhcpcd @@ -7,7 +7,7 @@ DAEMON=/usr/sbin/dhcpcd CONFIG=/etc/dhcpcd.conf PIDFILE=/var/run/dhcpcd/pid -[ -f $CONFIG ] || exit 0 +[ -f "${CONFIG}" ] || exit 0 case "$1" in start) diff --git a/files/board/arpl/overlayfs/opt/arpl/patch/config-manipulators.sh b/files/board/arpl/overlayfs/opt/arpl/patch/config-manipulators.sh index c23bafbd..1bb5024b 100755 --- a/files/board/arpl/overlayfs/opt/arpl/patch/config-manipulators.sh +++ b/files/board/arpl/overlayfs/opt/arpl/patch/config-manipulators.sh @@ -5,15 +5,15 @@ # be able to execute in the initramfs/preboot environment (so no bashism etc) # All comments will be stripped, functions here should NOT start with brp_ as they're not part of the builder -if [ -z ${SED_PATH+x} ]; then +if [ -z "${SED_PATH+x}" ]; then echo "Your SED_PATH variable is not set/is empty!" exit 1 fi ##$1 from, $2 to, $3 file to path _replace_in_file() { - if grep -q "$1" "$3"; then - $SED_PATH -i "$3" -e "s#$1#$2#" + if grep -q "${1}" "${3}"; then + "${SED_PATH}" -i "${3}" -e "s#${1}#${2}#" fi } @@ -23,16 +23,16 @@ _replace_in_file() { _set_conf_kv() { # Delete if [ -z "$2" ]; then - $SED_PATH -i "$3" -e "s/^$1=.*$//" + "${SED_PATH}" -i "${3}" -e "s/^${1}=.*$//" return 0 fi # Replace - if grep -q "^$1=" "$3"; then - $SED_PATH -i "$3" -e "s\"^$1=.*\"$1=\\\"$2\\\"\"" + if grep -q "^${1}=" "${3}"; then + "${SED_PATH}" -i "${3}" -e "s\"^${1}=.*\"${1}=\\\"${2}\\\"\"" return 0 fi # Add if doesn't exist - echo "$1=\"$2\"" >>$3 + echo "${1}=\"${2}\"" >>"${3}" } diff --git a/files/board/arpl/overlayfs/opt/arpl/patch/iosched-trampoline.sh b/files/board/arpl/overlayfs/opt/arpl/patch/iosched-trampoline.sh index 2d3e38c9..f6bff737 100755 --- a/files/board/arpl/overlayfs/opt/arpl/patch/iosched-trampoline.sh +++ b/files/board/arpl/overlayfs/opt/arpl/patch/iosched-trampoline.sh @@ -5,7 +5,7 @@ # When the kernel is booted with "elevator=elevator" it will attempt to load a module "elevator-iosched"... and the rest # should be obvious from the code below. DO NOT print anything here (kernel doesn't attach STDOUT) for arg in "$@"; do - if [ "$arg" = "elevator-iosched" ]; then + if [ "${arg}" = "elevator-iosched" ]; then insmod /usr/lib/modules/rp.ko rm /usr/lib/modules/rp.ko rm /usr/sbin/modprobe diff --git a/files/board/arpl/overlayfs/opt/arpl/vmlinux-to-bzImage.sh b/files/board/arpl/overlayfs/opt/arpl/vmlinux-to-bzImage.sh index 8bce3075..284c5964 100755 --- a/files/board/arpl/overlayfs/opt/arpl/vmlinux-to-bzImage.sh +++ b/files/board/arpl/overlayfs/opt/arpl/vmlinux-to-bzImage.sh @@ -42,7 +42,7 @@ SCRIPT_DIR=$(dirname $0) VMLINUX_MOD=${1} ZIMAGE_MOD=${2} KVER_MAJOR=${KVER:0:1} -if [ $KVER_MAJOR -eq 4 ] || [ $KVER_MAJOR -eq 3 ]; then +if [ ${KVER_MAJOR} -eq 4 ] || [ ${KVER_MAJOR} -eq 3 ]; then # Kernel version 4.x or 3.x (bromolow) #zImage_head 16494 #payload( diff --git a/files/board/arpl/overlayfs/root/.bashrc b/files/board/arpl/overlayfs/root/.bashrc index a497d495..20d40e4a 100644 --- a/files/board/arpl/overlayfs/root/.bashrc +++ b/files/board/arpl/overlayfs/root/.bashrc @@ -7,8 +7,8 @@ PS1='\u@\h:\w# ' # You may uncomment the following lines if you want `ls' to be colorized: export LS_OPTIONS='--color=auto' -alias ls='ls $LS_OPTIONS' -alias ll='ls $LS_OPTIONS -l' +alias ls='ls ${LS_OPTIONS}' +alias ll='ls ${LS_OPTIONS} -l' # Save history in realtime shopt -s histappend @@ -25,17 +25,17 @@ if [ -f ${BOOTLOADER_PATH}/.locale ]; then export LANG="$(cat ${BOOTLOADER_PATH}/.locale)" fi -if [ -d /opt/arpl/lang ]; then +if [ $(ls /opt/arpl/lang/*.mo 2>/dev/null | wc -l) -gt 0 ]; then for F in $(ls /opt/arpl/lang/*.mo); do - install "${F}" "/usr/share/locale/$(basename $F .mo)/LC_MESSAGES/arpl.mo" + install "${F}" "/usr/share/locale/$(basename "${F}" .mo)/LC_MESSAGES/arpl.mo" done fi if [ ! -f ${HOME}/.initialized ]; then - touch ${HOME}/.initialized + touch "${HOME}/.initialized" /opt/arpl/init.sh fi -cd /opt/arpl +cd "/opt/arpl" if tty | grep -q "/dev/pts" && [ -z "${SSH_TTY}" ]; then /opt/arpl/menu.sh #exit # Allow web access back to shell