From c081b5c63f7a50ae5687cc8cb874bdc1e810a79d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 9 Apr 2024 21:11:46 +0000 Subject: [PATCH] Clearly this causes some issue --- installentware.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/installentware.sh b/installentware.sh index ec0e9df..cc0532a 100644 --- a/installentware.sh +++ b/installentware.sh @@ -84,9 +84,6 @@ create_opt_mount() { cat < /lib/systemd/system/opt.mount [Unit] Description=Bind /usrdata/opt to /opt -After=systemrw.mount sockets.target -Before=basic.target -RequiresMountsFor=/usrdata [Mount] What=/usrdata/opt @@ -95,13 +92,29 @@ Type=none Options=bind [Install] -WantedBy=basic.target local-fs.target +WantedBy=multi-user.target EOF systemctl daemon-reload - ln -s /lib/systemd/system/opt.mount /lib/systemd/system/local-fs.target.wants/opt.mount - systemctl enable opt.mount systemctl start opt.mount + + # Additional systemd service to ensure opt.mount starts at boot + echo -e '\033[32mInfo: Creating service to start opt.mount at boot...\033[0m' + cat < /lib/systemd/system/start-opt-mount.service +[Unit] +Description=Ensure opt.mount is started at boot +After=network.target + +[Service] +Type=oneshot +ExecStart=/bin/systemctl start opt.mount + +[Install] +WantedBy=multi-user.target +EOF + + systemctl daemon-reload + ln -s /lib/systemd/system/start-opt-mount.service /lib/systemd/system/multi-user.target.wants/start-opt-mount.service } if [ -n "$PRE_OPKG_PATH" ]; then @@ -233,6 +246,5 @@ opkg update && opkg install shadow-login shadow-passwd ln -sf /opt/bin/dfc /bin opkg install lsof ln -sf /opt/bin/lsof /bin - # Remount filesystem as read-only mount -o remount,ro /