summary refs log tree commit diff
path: root/host/rootfs/etc/s6-rc/weston/run
blob: df2d74ed90daedfc8d0b2e984d6edd165196ab74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/execlineb -P
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>

foreground { mkdir /run/user }
foreground {
  umask 077
  mkdir /run/user/0
}
unexport ?

backtick USER { id -un }
backtick HOME {
  importas -i user USER
  homeof $user
}

export XDG_RUNTIME_DIR /run/user/0
redirfd -r 0 /dev/tty1

importas -i home HOME
cd $home
weston