Skip to content
Snippets Groups Projects
Commit 8f35d6e4 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

ported to 66 v0.2.1.0, use @I into file to be consistent with instance...

ported to 66 v0.2.1.0, use @I into file to be consistent with instance name,use @M instead of @MOD@ to prepare the transition to C
parent c8d98d2c
Branches master
Tags 0.8.0
No related merge requests found
[main]
@type = bundle
@name = All-@MOD@
@description = "First service called to start a scandir for @MOD@ user"
@user = (root)
@contents = ( mount-run-@MOD@ setenv-@MOD@ scandir-@MOD@ )
Modules name: Modules name:
- boot-user-@ - boot-user@
Version: Version:
- 0.1.0 - 0.2.0
Description: Description:
- This module configure a set of services for an <user> to properly - This module configure a set of services for an <user> to properly
deal with Display Manager(a.k.a DM). deal with Display Manager(a.k.a DM).
...@@ -26,13 +26,13 @@ Optional package dependencies: ...@@ -26,13 +26,13 @@ Optional package dependencies:
Installation directive: Installation directive:
# 66-mods.sh boot-user-@<user> # 66-mods.sh boot-user@<user>
# 66-enable boot-user-<user> # 66-enable boot-user@<user>
- Dbus and dbus-session-@: - Dbus and dbus-session@:
- dbus daemon should be enabled and up before - dbus daemon should be enabled and up before
starting the module on a root tree. starting the module on a root tree.
- dbus-session-<user> should be enabled on a <user> tree. - dbus-session@<user> should be enabled on a <user> tree.
It will be brought up at the start of the session. It will be brought up at the start of the session.
Note: .xinitrc file execute an JWM session by default. Edit it Note: .xinitrc file execute an JWM session by default. Edit it
...@@ -60,7 +60,7 @@ Runtime: ...@@ -60,7 +60,7 @@ Runtime:
- It create a scandir as <user> as owner merging the environment from - It create a scandir as <user> as owner merging the environment from
the directory ${HOME}/.66/conf/boot-user/ and start it. the directory ${HOME}/.66/conf/boot-user/ and start it.
Example of ${HOME}/.66/conf/boot-user/boot-user-<user>.conf file: Example of ${HOME}/.66/conf/boot-user/boot-user@<user>.conf file:
HOME=/home/oblive HOME=/home/oblive
LOGNAME=obarun LOGNAME=obarun
......
[main]
@type = bundle
@description = "First service called to start a scandir for @I user"
@user = (root)
@contents = ( mount-run-@I setenv-@I scandir-@I )
[main] [main]
@type = oneshot @type = oneshot
@name = setenv-@MOD@ @description = "Set well-know variable for @I user"
@description = "Set well-know variable for @MOD@ user"
@user = (root) @user = (root)
[start] [start]
@build = auto @build = auto
@runas = @MOD@ @runas = @I
@execute = @execute =
( (
execl-subuidgid execl-subuidgid
backtick -n HOME { homeof @MOD@ } backtick -n HOME { homeof @I }
importas -u HOME HOME importas -u HOME HOME
foreground foreground
{ {
if -nt { test -d ${HOME}/.66/conf/boot-user } if -nt { test -d ${HOME}/.66/conf/boot-user }
mkdir -p ${HOME}/.66/conf/boot-user mkdir -p ${HOME}/.66/conf/boot-user
} }
redirfd -w 1 ${HOME}/.66/conf/boot-user/boot-user-@MOD@.conf redirfd -w 1 ${HOME}/.66/conf/boot-user/boot-user@@I.conf
## GENERAL VARIABLES ## GENERAL VARIABLES
if { 66-echo HOME=${HOME} } if { 66-echo HOME=${HOME} }
if { 66-echo LOGNAME=@MOD@ } if { 66-echo LOGNAME=@I }
if { 66-echo USER=@MOD@ } if { 66-echo USER=@I }
foreground { foreground {
importas PATH PATH importas PATH PATH
......
[main] [main]
@type = oneshot @type = oneshot
@name = mount-run-@MOD@ @description = "Mount /run/user directory of @I"
@description = "Mount /run/user directory of @MOD@"
@user = (root) @user = (root)
[start] [start]
...@@ -9,7 +8,7 @@ ...@@ -9,7 +8,7 @@
@execute = @execute =
( (
## create /run/user/<uid> ## create /run/user/<uid>
execl-subuidgid -o @MOD@ execl-subuidgid -o @I
foreground { foreground {
if -nt { mountpoint -q /run/user/${UID} } if -nt { mountpoint -q /run/user/${UID} }
if { mkdir -p /run/user/${UID} } if { mkdir -p /run/user/${UID} }
......
[main] [main]
@type = longrun @type = longrun
@name = scandir-@MOD@ @description = "Start a scandir for @I"
@description = "Start a scandir for @MOD@"
@user = ( root ) @user = ( root )
@options = ( log ) @options = ( log )
@depends = ( mount-run-@MOD@ setenv-@MOD@ ) @depends = ( mount-run-@I setenv-@I )
@notify = 3 @notify = 3
@timeout-up = 3000 @timeout-up = 3000
[start] [start]
@build = auto @build = auto
@runas = @MOD@ @runas = @I
@execute = @execute =
( (
s6-setsid -qb -- s6-setsid -qb --
umask 022 umask 022
66-scandir -v3 -d3 -cu -e /home/@MOD@/.66/conf/boot-user 66-scandir -v3 -d3 -cu -e /home/@I/.66/conf/boot-user
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment