98 lines
3.0 KiB
Diff
98 lines
3.0 KiB
Diff
--- a/base-files/files/bin/board_detect
|
|
+++ b/base-files/files/bin/board_detect
|
|
@@ -6,7 +6,7 @@ CFG=$1
|
|
|
|
[ -d "/etc/board.d/" -a ! -s "$CFG" ] && {
|
|
for a in $(ls /etc/board.d/*); do
|
|
- [ -x $a ] || continue;
|
|
+ [ -s $a ] || continue;
|
|
$(. $a)
|
|
done
|
|
}
|
|
|
|
--- a/base-files/files/lib/functions.sh
|
|
+++ b/base-files/files/lib/functions.sh
|
|
@@ -283,10 +283,13 @@ default_postinst() {
|
|
if [ "$PKG_UPGRADE" != "1" ]; then
|
|
"$i" enable
|
|
fi
|
|
- "$i" start
|
|
+ if "$i" enabled; then
|
|
+ "$i" start
|
|
+ fi
|
|
fi
|
|
done
|
|
|
|
+ [ -x /etc/init.d/ucitrack ] && /etc/init.d/ucitrack reload
|
|
return $ret
|
|
}
|
|
|
|
|
|
--- a/base-files/files/etc/shinit
|
|
+++ b/base-files/files/etc/shinit
|
|
@@ -2,6 +2,8 @@
|
|
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
|
|
|
|
alias ll='ls -alF --color=auto'
|
|
+alias reboot='(/bin/busybox reboot &);sleep 3;/bin/busybox reboot -f'
|
|
+PS1='\[\033[35;1m\]\u\[\033[0m\]@\[\033[31;1m\]\h \[\e[36m\]\@\[\e[m\] \[\033[32;1m\]\W\[\033[0m\]\[\033[31m\]\$\[\033[0m\] '
|
|
|
|
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
|
|
|
|
--- a/base-files/files/sbin/sysupgrade
|
|
+++ b/base-files/files/sbin/sysupgrade
|
|
@@ -231,24 +231,10 @@ do_save_conffiles() {
|
|
ask_bool 0 "Edit config file list" && vi "$CONFFILES"
|
|
|
|
if [ "$SAVE_INSTALLED_PKGS" -eq 1 ]; then
|
|
- echo "${INSTALLED_PACKAGES}" >> "$CONFFILES"
|
|
- mkdir -p "$ETCBACKUP_DIR"
|
|
- # Avoid touching filesystem on each backup
|
|
- RAMFS="$(mktemp -d -t sysupgrade.XXXXXX)"
|
|
- mkdir -p "$RAMFS/upper" "$RAMFS/work"
|
|
- mount -t overlay overlay -o lowerdir=$ETCBACKUP_DIR,upperdir=$RAMFS/upper,workdir=$RAMFS/work $ETCBACKUP_DIR &&
|
|
- UMOUNT_ETCBACKUP_DIR=1 || {
|
|
- echo "Cannot mount '$ETCBACKUP_DIR' as tmpfs to avoid touching disk while saving the list of installed packages." >&2
|
|
- ask_bool 0 "Abort" && exit
|
|
- }
|
|
-
|
|
- # Format: pkg-name<TAB>{rom,overlay,unkown}
|
|
- # rom is used for pkgs in /rom, even if updated later
|
|
- find /usr/lib/opkg/info -name "*.control" \( \
|
|
- \( -exec test -f /rom/{} \; -exec echo {} rom \; \) -o \
|
|
- \( -exec test -f /overlay/upper/{} \; -exec echo {} overlay \; \) -o \
|
|
- \( -exec echo {} unknown \; \) \
|
|
- \) | sed -e 's,.*/,,;s/\.control /\t/' > ${INSTALLED_PACKAGES}
|
|
+ . /etc/profile.d/opkg.sh; opkg save
|
|
+ else
|
|
+ uci -q del opkg.auto
|
|
+ uci commit opkg
|
|
fi
|
|
|
|
v "Saving config files..."
|
|
|
|
--- a/luci-base/root/etc/init.d/ucitrack
|
|
+++ b/luci-base/root/etc/init.d/ucitrack
|
|
@@ -8,7 +8,7 @@ register_init() {
|
|
local init="$2"
|
|
shift; shift
|
|
|
|
- if [ -x "$init" ] && "$init" enabled && ! grep -sqE 'USE_PROCD=.' "$init"; then
|
|
+ if [ -x "$init" ] && ! grep -sqE 'USE_PROCD=.' "$init"; then
|
|
logger -t "ucitrack" "Setting up /etc/config/$config reload trigger for non-procd $init"
|
|
procd_add_config_trigger "config.change" "$config" "$init" "$@"
|
|
fi
|
|
|
|
--- a/base-files/files/etc/profile
|
|
+++ b/base-files/files/etc/profile
|
|
@@ -22,7 +23,7 @@ esac
|
|
|
|
[ -n "$FAILSAFE" ] || {
|
|
for FILE in /etc/profile.d/*.sh; do
|
|
- [ -e "$FILE" ] && . "$FILE"
|
|
+ [ -e "$FILE" ] && [ "$FILE" == "/etc/profile.d/sysinfo.sh" ] && env -i bash "$FILE" || . "$FILE"
|
|
done
|
|
unset FILE
|
|
}
|
|
|