On Sat, May 10, 2025 at 12:39:00PM -0500, izder456 wrote: > > > diff --git a/x11/emwm-utils/Makefile b/x11/emwm-utils/Makefile > > > index 0d8b6ba9f61..62e4397077a 100644 > > > --- a/x11/emwm-utils/Makefile > > > +++ b/x11/emwm-utils/Makefile > > > @@ -3,6 +3,7 @@ COMMENT = session manager and a > > > toolchest-like application launcher V = 1.3 > > > DISTNAME = emwm-utils-src-${V} > > > PKGNAME = emwm-utils-${V} > > > +REVISION = 0 > > > > > > CATEGORIES = x11 > > > HOMEPAGE = https://fastestcode.org/emwm.html > > > @@ -19,8 +20,13 @@ WANTLIB += X11 Xinerama Xm Xrandr Xss Xt c > > > > > > LIB_DEPENDS = x11/motif > > > > > > +MAKE_ENV = REBOOT_CMD="/sbin/shutdown -r now" \ > > > + SHUTDOWN_CMD="/sbin/shutdown -p now" \ > > > + SUSPEND_CMD="/usr/sbin/zzz" > > > + > > > MAKE_FLAGS = RCDIR=${PREFIX}/lib/X11 \ > > > - CFLAGS="${CFLAGS} -I./Xm -I${X11BASE}/include > > > -I${LOCALBASE}/include" > > > + CFLAGS="${CFLAGS} -DUNPRIVILEGED_SHUTDOWN \ > > > + -I./Xm -I${X11BASE}/include > > > -I${LOCALBASE}/include" > > > > I don't get how this works. MAKE_ENV works like running `env -i > > ${MAKE_ENV} ... ${MAKE} ...`; it adds variable to the environment in > > which make (in this case) is then executed. The way this software gets > > those *_CMD configured is by preprocessor definitions. You'd need to > > add -DREBOOT_CMD=... to CFLAGS for it to work. > > > > Nevertheless, src/smconf.h defines the right binaries for us if none > > were given as a preprocessor macro; I guess that's why this is > > working? I don't believe setting MAKE_ENV is necessary, nor defining > > your own *_CMD. > > > Well, this src/smconf.h file hardcodes `/sbin/reboot` when running the > gui reboot option. Overriding this at least enables reboot access. IIRC > the _shutdown group doesn't affect the `reboot` command, only > `_shutdown`. Unless something changed? > > I suppose I could tack this into CFLAGS via a -DREBOOT_CMD option.
Oh, indeed. I always assumed reboot and halt to be links to shutdown. So yes, you'll need to specify -DREBOOT_CMD.