summaryrefslogtreecommitdiff
path: root/examples/etc/execline-shell
diff options
context:
space:
mode:
Diffstat (limited to 'examples/etc/execline-shell')
-rwxr-xr-xexamples/etc/execline-shell18
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/etc/execline-shell b/examples/etc/execline-shell
new file mode 100755
index 0000000..ac8c141
--- /dev/null
+++ b/examples/etc/execline-shell
@@ -0,0 +1,18 @@
+#!/bin/execlineb -S0
+
+backtick -n defaulthome
+{
+ if -nt
+ {
+ backtick -n defaultuser { id -un }
+ importas -u defaultuser defaultuser
+ importas -D $defaultuser USER USER
+ redirfd -w 2 /dev/null
+ homeof ${USER}
+ }
+ s6-echo /
+}
+importas -u defaulthome defaulthome
+importas -D $defaulthome HOME HOME
+tryexec { ${HOME}/.execline-shell $@ }
+/bin/sh $@