Several changes are required to improve compatibility with FreeBSD. These changes are addressed in Pull Request #422 and include renaming the RC service, updating the command used to get the machine architecture, and creating a symlink for /dev/shm. Each change is necessary to ensure smoother integration and functionality on FreeBSD systems.
These updates have been tested on Debian 12, Rocky Linux 9, and FreeBSD 14.1 to ensure cross-platform functionality.
Changes
Rename RC Service to lsws:
The current service name lsws.sh is not compatible with FreeBSD’s sysrc command, as sysrc does not support values with dots (.). This causes the following error:
sysrc: lsws.sh_enable: name contains characters not allowed in shell
FreeBSD does not have a /dev/shm directory by default. To ensure compatibility with software that expects /dev/shm, a symlink should be created by linking /tmp/shm to /dev/shm:
These changes ensure compatibility with FreeBSD and allow proper service management, architecture detection, and shared memory handling. Without these changes, users may encounter issues related to service management (sysrc errors), architecture detection (missing arch command), and software compatibility (missing /dev/shm).
Issue Summary
Several changes are required to improve compatibility with FreeBSD. These changes are addressed in Pull Request #422 and include renaming the RC service, updating the command used to get the machine architecture, and creating a symlink for /dev/shm. Each change is necessary to ensure smoother integration and functionality on FreeBSD systems.
These updates have been tested on Debian 12, Rocky Linux 9, and FreeBSD 14.1 to ensure cross-platform functionality.
Changes
Rename RC Service to
lsws
:lsws.sh
is not compatible with FreeBSD’ssysrc
command, assysrc
does not support values with dots (.
). This causes the following error:lsws.sh
tolsws
, allowingsysrc lsws_enable="YES"
to be used without errors. https://github.com/litespeedtech/openlitespeed/blob/1b5825fa728aae4c975084e0c1f7e0ce241ba45a/dist/admin/misc/rc-inst.sh#L41-L42 https://github.com/litespeedtech/openlitespeed/blob/1b5825fa728aae4c975084e0c1f7e0ce241ba45a/dist/admin/misc/rc-uninst.sh#L19Replace
arch
withuname -m
:arch
command is not available by default. The equivalent command to get the machine's architecture isuname -m
. Replacingarch
withuname -m
ensures that scripts relying on architecture detection work properly on FreeBSD. https://github.com/litespeedtech/openlitespeed/blob/1b5825fa728aae4c975084e0c1f7e0ce241ba45a/dist/install.sh#L7 https://github.com/litespeedtech/openlitespeed/blob/1b5825fa728aae4c975084e0c1f7e0ce241ba45a/dist/install.sh#L53Create Symlink for
/dev/shm
:/dev/shm
directory by default. To ensure compatibility with software that expects/dev/shm
, a symlink should be created by linking/tmp/shm
to/dev/shm
:https://github.com/litespeedtech/openlitespeed/blob/1b5825fa728aae4c975084e0c1f7e0ce241ba45a/build.sh#L511-L518
Environment
v1.8.2
tag)Additional Information
These changes ensure compatibility with FreeBSD and allow proper service management, architecture detection, and shared memory handling. Without these changes, users may encounter issues related to service management (
sysrc
errors), architecture detection (missingarch
command), and software compatibility (missing/dev/shm
).