From 23158bcca17c60f4a1749614d76564681c4b8f25 Mon Sep 17 00:00:00 2001 From: mstone2001 <80594939+mstone2001@users.noreply.github.com> Date: Tue, 26 Sep 2023 17:36:07 -0400 Subject: [PATCH] Support Additional OS. Update xrdp to support netbsd, openindiana, macos, gentoo linux. --- configure.ac | 7 +++++++ instfiles/Makefile.am | 6 ++++++ instfiles/openrc/Makefile.am | 3 +++ instfiles/openrc/xrdp | 4 ++++ instfiles/openrc/xrdp-sesman | 4 ++++ 5 files changed, 24 insertions(+) create mode 100644 instfiles/openrc/Makefile.am create mode 100755 instfiles/openrc/xrdp create mode 100755 instfiles/openrc/xrdp-sesman diff --git a/configure.ac b/configure.ac index 3e3557dbb4..e313bc26d1 100644 --- a/configure.ac +++ b/configure.ac @@ -188,6 +188,11 @@ AC_ARG_ENABLE(rdpsndaudin, AS_HELP_STRING([--enable-rdpsndaudin], [], [enable_rdpsndaudin=no]) AM_CONDITIONAL(XRDP_RDPSNDAUDIN, [test x$enable_rdpsndaudin = xyes]) +AC_ARG_ENABLE(openrc, AS_HELP_STRING([--enable-openrc], + [Use openrc in (default: no)]), + [], [enable_openrc=no]) +AM_CONDITIONAL(XRDP_OPENRC, [test x$enable_openrc = xyes]) + AC_ARG_WITH(imlib2, AS_HELP_STRING([--with-imlib2=ARG], [imlib2 library to use for non-BMP backgrounds (ARG=yes/no/)]),,) AC_ARG_WITH(freetype2, AS_HELP_STRING([--with-freetype2=ARG], [freetype2 library to use for rendering fonts (ARG=yes/no/)]),,) @@ -574,6 +579,7 @@ AC_CONFIG_FILES([ instfiles/pam.d/Makefile instfiles/pulse/Makefile instfiles/rc.d/Makefile + instfiles/openrc/Makefile keygen/Makefile waitforx/Makefile libipm/Makefile @@ -628,6 +634,7 @@ echo " ipv6only $enable_ipv6only" echo " vsock $enable_vsock" echo " auth mechanism $auth_mech" echo " rdpsndaudin $enable_rdpsndaudin" +echo " openrc $enable_openrc" echo echo " with imlib2 $use_imlib2" echo " with freetype2 $use_freetype2" diff --git a/instfiles/Makefile.am b/instfiles/Makefile.am index a318ed8f92..47ccbabde1 100644 --- a/instfiles/Makefile.am +++ b/instfiles/Makefile.am @@ -66,9 +66,15 @@ systemdsystemunit_DATA = \ xrdp-sesman.service \ xrdp.service else +if XRDP_OPENRC + SUBDIRS += \ + default \ + openrc +else SUBDIRS += \ default \ init.d +endif # XRDP_OPENRC endif # HAVE_SYSTEMD endif # LINUX diff --git a/instfiles/openrc/Makefile.am b/instfiles/openrc/Makefile.am new file mode 100644 index 0000000000..576a9a70c1 --- /dev/null +++ b/instfiles/openrc/Makefile.am @@ -0,0 +1,3 @@ +startscriptdir = $(sysconfdir)/init.d + +dist_startscript_SCRIPTS = xrdp xrdp-sesman diff --git a/instfiles/openrc/xrdp b/instfiles/openrc/xrdp new file mode 100755 index 0000000000..6e59f651b5 --- /dev/null +++ b/instfiles/openrc/xrdp @@ -0,0 +1,4 @@ +#!/sbin/openrc-run + +command="/usr/local/sbin/xrdp" +pidfile="/run/${RC_SVCNAME}.pid" diff --git a/instfiles/openrc/xrdp-sesman b/instfiles/openrc/xrdp-sesman new file mode 100755 index 0000000000..c5a8827983 --- /dev/null +++ b/instfiles/openrc/xrdp-sesman @@ -0,0 +1,4 @@ +#!/sbin/openrc-run + +command="/usr/local/sbin/xrdp-sesman" +pidfile="/run/${RC_SVCNAME}.pid"