diff --git a/src/Core/System/RootFS/etc/profile b/src/Core/System/RootFS/etc/profile index 020d81e34..2ee73406b 100644 --- a/src/Core/System/RootFS/etc/profile +++ b/src/Core/System/RootFS/etc/profile @@ -88,10 +88,10 @@ _remountOffload() mountPoint="$(mount | grep /offload | cut -d ' ' -f 1)"; if [ "${nowMode}" == 'rw' ]; then newMode='ro'; - mount -o remount,ro "$mountPoint"; + /bin/busybox mount -o remount,ro "$mountPoint"; else newMode='rw'; - mount -o remount,rw "$mountPoint"; + /bin/busybox mount -o remount,rw "$mountPoint"; fi; echo "Mode for /offload ${newMode} disk:${mountPoint}"; } diff --git a/src/Core/System/Storage.php b/src/Core/System/Storage.php index d3e2cbca0..85f926a3b 100644 --- a/src/Core/System/Storage.php +++ b/src/Core/System/Storage.php @@ -772,8 +772,8 @@ private function updateEnvironmentAfterChangeMountPoint(): void private function createWorkDirs(): void { $path = ''; - $mountPath = Util::which('mount'); - Processes::mwExec("$mountPath -o remount,rw /offload 2> /dev/null"); + $busyBoxPath = Util::which('busybox'); + Processes::mwExec("$busyBoxPath mount -o remount,rw /offload 2> /dev/null"); $isLiveCd = file_exists('/offload/livecd'); @@ -816,7 +816,7 @@ private function createWorkDirs(): void $this->clearCacheFiles(); $this->clearTmpFiles(); $this->applyFolderRights(); - Processes::mwExec("$mountPath -o remount,ro /offload 2> /dev/null"); + Processes::mwExec("$busyBoxPath mount -o remount,ro /offload 2> /dev/null"); } /** @@ -1088,8 +1088,8 @@ private function getLsBlkDiskInfo(): array public function createWorkDirsAfterDBUpgrade(): void { // Remount /offload directory as read-write - $mountPath = Util::which('mount'); - Processes::mwExec("$mountPath -o remount,rw /offload 2> /dev/null"); + $busyBoxPath = Util::which('busybox'); + Processes::mwExec("$busyBoxPath mount -o remount,rw /offload 2> /dev/null"); // Create symlinks for module caches $this->createModulesCacheSymlinks(); @@ -1098,7 +1098,7 @@ public function createWorkDirsAfterDBUpgrade(): void $this->applyFolderRights(); // Remount /offload directory as read-only - Processes::mwExec("$mountPath -o remount,ro /offload 2> /dev/null"); + Processes::mwExec("$busyBoxPath mount -o remount,ro /offload 2> /dev/null"); } /** diff --git a/src/Core/System/System.php b/src/Core/System/System.php index 04d46513f..0045ba848 100644 --- a/src/Core/System/System.php +++ b/src/Core/System/System.php @@ -193,8 +193,8 @@ public static function timezoneConfigure(): void */ public static function setupLocales(): void { - $mountPath = Util::which('mount'); - shell_exec("$mountPath -o remount,rw /offload 2> /dev/null"); + $busyBoxPath = Util::which('busybox'); + Processes::mwExec("$busyBoxPath mount -o remount,rw /offload 2> /dev/null"); $locales = ['en_US', 'en_GB', 'ru_RU']; $localeDefPath = Util::which('localedef'); $localePath = Util::which('locale'); @@ -204,7 +204,7 @@ public static function setupLocales(): void } shell_exec("$localeDefPath -i $locale -f UTF-8 $locale.UTF-8"); } - shell_exec("$mountPath -o remount,ro /offload 2> /dev/null"); + Processes::mwExec("$busyBoxPath mount -o remount,ro /offload 2> /dev/null"); } /** diff --git a/tests/Calls/start.sh b/tests/Calls/start.sh index 9505e8019..f2bd1d86d 100644 --- a/tests/Calls/start.sh +++ b/tests/Calls/start.sh @@ -15,7 +15,7 @@ function echo_info() { echo_header 'Init asterisk...'; dirName="$(realpath "$(dirname "$0")")"; -/bin/mount -o remount,rw /offload/ +/bin/busybox mount -o remount,rw /offload/ ############################################################ ##### Setup configs # Убиваем старый процесс.