Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Aug 20, 2023
1 parent 8905f37 commit fa21e70
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion files/board/arpl/overlayfs/etc/init.d/S41dhcpcd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 7 additions & 7 deletions files/board/arpl/overlayfs/opt/arpl/patch/config-manipulators.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion files/board/arpl/overlayfs/opt/arpl/vmlinux-to-bzImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
12 changes: 6 additions & 6 deletions files/board/arpl/overlayfs/root/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fa21e70

Please sign in to comment.