mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
tree: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
2b614c1806
commit
7958ad5d19
@ -57,14 +57,12 @@ elif [ "${1}" = "late" ]; then
|
||||
tar -zxf /addons/console-7.1.tgz -C /tmpRoot/usr/
|
||||
# run when boot installed DSM
|
||||
echo -e "DSM mode\n" >/tmpRoot/etc/issue
|
||||
if [ ! -f /tmpRoot/usr/lib/systemd/system/getty\@.service ]; then # misc addon is do this
|
||||
cp -fv /tmpRoot/usr/lib/systemd/system/serial-getty\@.service /tmpRoot/usr/lib/systemd/system/getty\@.service
|
||||
sed -i 's|^ExecStart=.*|ExecStart=-/sbin/agetty %I 115200 linux|' /tmpRoot/usr/lib/systemd/system/getty\@.service
|
||||
fi
|
||||
if [ ! -f /tmpRoot/usr/lib/systemd/system/getty.target.wants/getty\@tty1.service ]; then
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/getty.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/getty\@.service /tmpRoot/usr/lib/systemd/system/getty.target.wants/getty\@tty1.service
|
||||
fi
|
||||
|
||||
cp -fv /tmpRoot/usr/lib/systemd/system/serial-getty\@.service /tmpRoot/usr/lib/systemd/system/getty\@tty1.service
|
||||
sed -i 's|^ExecStart=.*|ExecStart=-/sbin/agetty %I 115200 linux|' /tmpRoot/usr/lib/systemd/system/getty\@tty1.service
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/getty.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/getty\@tty1.service /tmpRoot/usr/lib/systemd/system/getty.target.wants/getty\@tty1.service
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/keymap.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
|
@ -83,7 +83,7 @@ elif [ "${1}" = "late" ]; then
|
||||
cat /addons/modulelist 2>/dev/null | /tmpRoot/bin/sed '/^\s*$/d' | while IFS=' ' read -r O M; do
|
||||
[ "${O:0:1}" = "#" ] && continue
|
||||
[ -z "${M}" -o -z "$(ls /usr/lib/modules/${M} 2>/dev/null)" ] && continue
|
||||
if [ "${O^^}" = "F" ]; then
|
||||
if [ "$(echo "${O}" | /tmpRoot/bin/sed 's/.*/\U&/')" = "F" ]; then
|
||||
/tmpRoot/bin/cp -vrf /usr/lib/modules/${M} /tmpRoot/usr/lib/modules/
|
||||
else
|
||||
/tmpRoot/bin/cp -vrn /usr/lib/modules/${M} /tmpRoot/usr/lib/modules/
|
||||
|
@ -23,7 +23,7 @@ After=multi-user.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/hdddb.sh -n -f -r -e -i -w -p
|
||||
ExecStart=/usr/bin/hdddb.sh -nfreSwp
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -202,10 +202,6 @@ elif [ "${1}" = "late" ]; then
|
||||
# service
|
||||
SERVICE_PATH="/tmpRoot/usr/lib/systemd/system"
|
||||
sed -i 's|ExecStart=/|ExecStart=-/|g' ${SERVICE_PATH}/syno-oob-check-status.service ${SERVICE_PATH}/SynoInitEth.service ${SERVICE_PATH}/syno_update_disk_logs.service
|
||||
if [ ! -f /tmpRoot/usr/lib/systemd/system/getty\@.service ]; then
|
||||
cp -fv /tmpRoot/usr/lib/systemd/system/serial-getty\@.service /tmpRoot/usr/lib/systemd/system/getty\@.service
|
||||
sed -i 's|^ExecStart=.*|ExecStart=-/sbin/agetty %I 115200 linux|' /tmpRoot/usr/lib/systemd/system/getty\@.service
|
||||
fi
|
||||
# getty
|
||||
for I in $(cat /proc/cmdline 2>/dev/null | grep -oE 'getty=[^ ]+' | sed 's/getty=//'); do
|
||||
TTYN="$(echo "${I}" | cut -d',' -f1)"
|
||||
@ -215,8 +211,10 @@ elif [ "${1}" = "late" ]; then
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/getty.target.wants
|
||||
if [ -n "${TTYN}" ] && [ -e "/dev/${TTYN}" ]; then
|
||||
echo "Make getty\@${TTYN}.service"
|
||||
cp -vf /tmpRoot/usr/lib/systemd/system/getty\@.service /tmpRoot/usr/lib/systemd/system/getty.target.wants/getty\@${TTYN}.service
|
||||
[ -n "${BAUD}" ] && sed -i "s|115200 linux|${BAUD} linux|" /tmpRoot/usr/lib/systemd/system/getty.target.wants/getty\@${TTYN}.service
|
||||
cp -fv /tmpRoot/usr/lib/systemd/system/serial-getty\@.service /tmpRoot/usr/lib/systemd/system/getty\@${TTYN}.service
|
||||
sed -i "s|^ExecStart=.*|ExecStart=-/sbin/agetty %I ${BAUD:-115200} linux|" /tmpRoot/usr/lib/systemd/system/getty\@${TTYN}.service
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/getty.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/getty\@${TTYN}.service /tmpRoot/usr/lib/systemd/system/getty.target.wants/getty\@${TTYN}.service
|
||||
fi
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user