diff --git a/Makefile b/Makefile index dad92ae666bf2c7da1d68b255007a3dbfadd4de3..26ee861d3b4b68d246e7a24bbff4be68ff2c51c4 100644 --- a/Makefile +++ b/Makefile @@ -24,15 +24,16 @@ install-seed: $(SEED_TARGET:module/configure/session=$(DESTDIR)$(seed_directory) $(DESTDIR)$(service_directory)/$(package)/%: module/% exec $(INSTALL) -D -m 644 $< $@ - sed -i -e 's,@VERSION@,$(version),' \ - -e "s,@DISPLAY_MANAGER@,$(DISPLAY_MANAGER)," \ - -e "s,@CONSOLE_TRACKER@,$(CONSOLE_TRACKER)," \ - -e "s,@XDG_RUNTIME@,$(XDG_RUNTIME)," \ - -e "s,@DESKTOP_CMDLINE@,$(DESKTOP_CMDLINE)," $@ + sed -i -e 's,%%VERSION%%,$(version),' \ + -e "s,%%DISPLAY_MANAGER%%,$(DISPLAY_MANAGER)," \ + -e "s,%%CONSOLE_TRACKER%%,$(CONSOLE_TRACKER)," \ + -e "s,%%XDG_RUNTIME%%,$(XDG_RUNTIME)," \ + -e "s,%%DESKTOP_CMDLINE%%,$(DESKTOP_CMDLINE)," $@ $(DESTDIR)$(service_directory)/$(package)/configure/%: module/configure/% exec $(INSTALL) -D -m 755 $< $@ - sed -i -e 's,@BINDIR@,$(bindir),' $@ + sed -i -e 's,%%BINDIR%%,$(bindir),' \ + -e 's,%%EXECLINEDIR%%,$(execlinedir),' $@ $(DESTDIR)$(seed_directory)/session: module/configure/session exec $(INSTALL) -D -m 644 $< $@ diff --git a/module/boot-user@ b/module/boot-user@ index 6a85c273d933503a8d335f7a45969689e9fd687b..a9e9a8617e299b711b19d25f422c3249d4dd6b7c 100644 --- a/module/boot-user@ +++ b/module/boot-user@ @@ -1,6 +1,6 @@ [main] @type = module -@version = @VERSION@ +@version = %%VERSION%% @description = "Configure a nested supervision tree for @I user" @user = ( root ) @depends = ( scandir@@I ) @@ -8,7 +8,9 @@ [regex] @configure = "@I" -@infiles = ( ::@version@=@VERSION@ ) +@infiles = ( + ::%%version%%=%%VERSION%% +) [environment] ## Uncomment it to use a display manager. @@ -17,22 +19,22 @@ ## e.g sddm,lightdm,... ## It also prepare the .xsession file. -@DISPLAY_MANAGER@ +%%DISPLAY_MANAGER%% ## Uncomment it to use a console tracker. ## Can be any console tracker as long as the ## corresponding frontend file exist on your system ## e.g consolekit,seatd,turnstile,... -@CONSOLE_TRACKER@ +%%CONSOLE_TRACKER%% ## Create and mount the XDG_RUNTIME directory ## at /run/user/@I [yes|no] -@XDG_RUNTIME@ +%%XDG_RUNTIME%% ## Command to use in your .xinitrc ## to launch your desktop e.g.: openbox-session. ## If commented the .xinitrc file is not configured. -@DESKTOP_CMDLINE@ +%%DESKTOP_CMDLINE%% diff --git a/module/configure/.xinitrc b/module/configure/.xinitrc index 1b4872ca8720d198af327d42407b087acebf76e9..d55c2a46d85bcd0471baf9dece205732fd41f65b 100755 --- a/module/configure/.xinitrc +++ b/module/configure/.xinitrc @@ -1,4 +1,4 @@ -#!@BINDIR@/bash +#!%%BINDIR%%/bash if [ -d /etc/X11/xinit/xinitrc.d ] ; then for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do @@ -7,9 +7,9 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then unset f fi -list=( $(ls -A1 @PATH_ENVIRONMENT@ | sort) ) +list=( $(ls -A1 %%PATH_ENVIRONMENT%% | sort) ) for i in ${list[@]};do - var=( $(<@PATH_ENVIRONMENT@/${i}) ) + var=( $(<%%PATH_ENVIRONMENT%%/${i}) ) for j in ${var[@]}; do export ${j} done @@ -25,4 +25,4 @@ else fi ## Select the session to start -${cmd} @DESKTOP_CMDLINE@ +${cmd} %%DESKTOP_CMDLINE%% diff --git a/module/configure/.xsession b/module/configure/.xsession index 0a6b1532afd460bb257fc8f7ffcc04e942883502..420ec1db3ecf7b896500a4198213ec2c416b7eee 100755 --- a/module/configure/.xsession +++ b/module/configure/.xsession @@ -1,8 +1,8 @@ -#!@BINDIR@/bash +#!%%BINDIR%%/bash -list=( $(ls -A1 @PATH_ENVIRONMENT@ | sort) ) +list=( $(ls -A1 %%PATH_ENVIRONMENT%% | sort) ) for i in ${list[@]};do - var=( $(<@PATH_ENVIRONMENT@/${i}) ) + var=( $(<%%PATH_ENVIRONMENT%%/${i}) ) for j in ${var[@]}; do export ${j} done diff --git a/module/configure/configure b/module/configure/configure index b0b861c5cb76eaf9f9325641e8a2fe27e677e838..9dc32f15543e2313db9bf70272ba3327037b81b5 100755 --- a/module/configure/configure +++ b/module/configure/configure @@ -1,4 +1,4 @@ -#!@BINDIR@/sh +#!%%BINDIR%%/sh ## 66-yeller variable export PROG="${MOD_NAME}" @@ -12,7 +12,7 @@ ACTIVATED_PATH="${MOD_MODULE_DIR}/activated" DEPENDS_PATH="${ACTIVATED_PATH}/depends" owner="${1}" -home=$(homeof "${owner}") +home=$(%%EXECLINEDIR%%/homeof "${owner}") uid=$(id -u "${owner}") gid=$(id -g "${owner}") @@ -32,7 +32,7 @@ check_empty_var(){ depends(){ name="${1}" - 66-yeller %badd%n dependency: "${consolekit}" + 66-yeller %badd%n dependency: "${name}" touch "${DEPENDS_PATH}/${name}" || die "unable to add dependency ${MOD_MODULE_DIR}/service/${name}" } @@ -59,7 +59,7 @@ if execl-toc -X -V DISPLAY_MANAGER; then depends "${DISPLAY_MANAGER}" 66-yeller set environment at .xsession file to: %b"${home_env}"%n - sed -i "s:@PATH_ENVIRONMENT@:${home_env}:g" ".xsession" || die "unable to set environment directory at .xsession file" + sed -i "s:%%PATH_ENVIRONMENT%%:${home_env}:g" ".xsession" || die "unable to set environment directory at .xsession file" if [ -e "${home}/.xsession" ]; then random=$(date +%M%N) @@ -92,9 +92,9 @@ if execl-toc -X -V DESKTOP_CMDLINE; then check_empty_var "DESKTOP_CMDLINE" "${DESKTOP_CMDLINE}" 66-yeller set environment at .xinitrc file to: %b"${home_env}"%n - sed -i "s:@PATH_ENVIRONMENT@:${home_env}:g" ".xinitrc" || die "unable to set environment directory at .xinitrc file" + sed -i "s:%%PATH_ENVIRONMENT%%:${home_env}:g" ".xinitrc" || die "unable to set environment directory at .xinitrc file" 66-yeller set commandline at .xinitrc file to: %b"${DESKTOP_CMDLINE}"%n - sed -i "s:@DESKTOP_CMDLINE@:${DESKTOP_CMDLINE}:g" ".xinitrc" || die "unable to set environment directory at .xinitrc file" + sed -i "s:%%DESKTOP_CMDLINE%%:${DESKTOP_CMDLINE}:g" ".xinitrc" || die "unable to set environment directory at .xinitrc file" if [ -e "${home}/.xinitrc" ]; then random=$(date +%M%N) diff --git a/module/frontend/mount-run@ b/module/frontend/mount-run@ index af526a1661e1c1b72911c6f78c56aeb9f10f603a..ee58ac99fb32c9fa9e22c4420d6a543fac3d0d40 100644 --- a/module/frontend/mount-run@ +++ b/module/frontend/mount-run@ @@ -1,6 +1,6 @@ [main] @type = oneshot -@version = @version@ +@version = %%version%% @description = "Mount /run/user directory of user @I" @user = ( root )