mirror of
https://github.com/riptidewave93/UNVR-NAS.git
synced 2025-02-12 10:31:55 +00:00
fix: ensure unvrpro services don't exist on unvr
This is for https://github.com/riptidewave93/UNVR-NAS/issues/12, but we want to make sure UNVRPRO only services do not exist on the normal UNVR.
This commit is contained in:
parent
7c35890137
commit
76c17952a7
2 changed files with 21 additions and 7 deletions
|
@ -20,12 +20,16 @@ apt-mark hold linux-image-* # We do not want these, as we run our own kernel!
|
|||
|
||||
# Setup our services
|
||||
systemctl enable ubnt-init
|
||||
systemctl enable mock-ubnt-api
|
||||
systemctl enable ulcmd
|
||||
systemctl enable ulcmd-reboot-hook
|
||||
systemctl enable ulcmd-shutdown-hook
|
||||
systemctl enable unvr-fan-daemon
|
||||
|
||||
# Do we have ulcmd? if so, we are UNVRPRO so enable ulcmd services
|
||||
if [ -f "/usr/bin/ulcmd" ]; then
|
||||
systemctl enable mock-ubnt-api
|
||||
systemctl enable ulcmd
|
||||
systemctl enable ulcmd-reboot-hook
|
||||
systemctl enable ulcmd-shutdown-hook
|
||||
fi
|
||||
|
||||
# Now that we have our wanted kernel in place, do the rest of our installs
|
||||
apt-get -o Dpkg::Options::="--force-confold" -y --allow-downgrades \
|
||||
--allow-remove-essential --allow-change-held-packages install cloud-init \
|
||||
|
@ -67,9 +71,9 @@ jq --null-input --compact-output \
|
|||
jq --null-input --compact-output \
|
||||
"{uuid: \"fa4b1c66-ef79-11e5-87a0-0002b3a176b4\", devicename: \"enp0s2\", method: \"dhcp\", method6: \"auto\"}" | \
|
||||
omv-confdbadm update "conf.system.network.interface" -
|
||||
|
||||
# Set hostname
|
||||
omv-confdbadm update "conf.system.network.dns" "{\"hostname\": \"unvr-nas\"}"
|
||||
sed -i "s|myhostname = .*|myhostname = unvr-nas|g" /etc/postfix/main.cf
|
||||
|
||||
# Cleanup stuff we don't want floating around
|
||||
apt-get autoclean || true
|
||||
|
|
|
@ -60,8 +60,18 @@ if [ "${BOARD}" == "UNVRPRO" ]; then
|
|||
# Now for the REAL JANK! patch ulcmd so it doesn't rely on /proc/ubnthal, so we can use our userspace tool ubnteeprom
|
||||
sed -i 's|/proc/ubnthal/system.info|/tmp/.ubnthal_system_info|g' "${build_path}/rootfs/usr/bin/ulcmd"
|
||||
else
|
||||
# Remove our ld.so.conf.d as it's not needed for UVNR
|
||||
rm "${build_path}/rootfs/etc/ld.so.conf.d/ubnt.conf"
|
||||
# Remove UNVRPRO specific files/services
|
||||
rm "${build_path}/rootfs/etc/ld.so.conf.d/ubnt.conf" \
|
||||
"${build_path}/rootfs/etc/systemd/system/mock-ubnt-api.service" \
|
||||
"${build_path}/rootfs/etc/systemd/system/ulcmd.service" \
|
||||
"${build_path}/rootfs/etc/systemd/system/ulcmd-reboot-hook.service" \
|
||||
"${build_path}/rootfs/etc/systemd/system/ulcmd-shutdown-hook.service" \
|
||||
"${build_path}/rootfs/usr/bin/mock-ubnt-api" \
|
||||
"${build_path}/rootfs/usr/bin/ubnt-systool" \
|
||||
"${build_path}/rootfs/usr/bin/ubnt-tools" \
|
||||
"${build_path}/rootfs/usr/bin/ustorage" \
|
||||
"${build_path}/rootfs/usr/lib/init/boot/ubnt-ulcmd.sh" \
|
||||
"${build_path}/rootfs/usr/lib/python3/dist-packages/ubnthelpers.py"
|
||||
fi
|
||||
|
||||
# Copy over bluetooth firmware files
|
||||
|
|
Loading…
Reference in a new issue