about summary refs log tree commit diff
path: root/examples/etc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/etc')
-rw-r--r--examples/etc/env-startup/EDITOR1
-rw-r--r--examples/etc/env-startup/GZIP1
-rw-r--r--examples/etc/env-startup/LC_CTYPE1
-rw-r--r--examples/etc/env-startup/LESS1
-rw-r--r--examples/etc/env-startup/LESSCHARSET1
-rw-r--r--examples/etc/env-startup/MAIL0
-rw-r--r--examples/etc/env-startup/PAGER1
-rw-r--r--examples/etc/env-startup/PATH1
-rw-r--r--examples/etc/env-startup/SHELL1
-rw-r--r--examples/etc/env-startup/VISUAL1
-rwxr-xr-xexamples/etc/execline-shell18
-rwxr-xr-xexamples/etc/execline-startup15
12 files changed, 42 insertions, 0 deletions
diff --git a/examples/etc/env-startup/EDITOR b/examples/etc/env-startup/EDITOR
new file mode 100644
index 0000000..7c74f87
--- /dev/null
+++ b/examples/etc/env-startup/EDITOR
@@ -0,0 +1 @@
+vi
diff --git a/examples/etc/env-startup/GZIP b/examples/etc/env-startup/GZIP
new file mode 100644
index 0000000..6514c51
--- /dev/null
+++ b/examples/etc/env-startup/GZIP
@@ -0,0 +1 @@
+-r9
diff --git a/examples/etc/env-startup/LC_CTYPE b/examples/etc/env-startup/LC_CTYPE
new file mode 100644
index 0000000..927508f
--- /dev/null
+++ b/examples/etc/env-startup/LC_CTYPE
@@ -0,0 +1 @@
+en_US.UTF-8
diff --git a/examples/etc/env-startup/LESS b/examples/etc/env-startup/LESS
new file mode 100644
index 0000000..d963b9c
--- /dev/null
+++ b/examples/etc/env-startup/LESS
@@ -0,0 +1 @@
+-fMqrIX -b16 -z-2
diff --git a/examples/etc/env-startup/LESSCHARSET b/examples/etc/env-startup/LESSCHARSET
new file mode 100644
index 0000000..5546241
--- /dev/null
+++ b/examples/etc/env-startup/LESSCHARSET
@@ -0,0 +1 @@
+utf8
diff --git a/examples/etc/env-startup/MAIL b/examples/etc/env-startup/MAIL
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/etc/env-startup/MAIL
diff --git a/examples/etc/env-startup/PAGER b/examples/etc/env-startup/PAGER
new file mode 100644
index 0000000..c96a5ab
--- /dev/null
+++ b/examples/etc/env-startup/PAGER
@@ -0,0 +1 @@
+less
diff --git a/examples/etc/env-startup/PATH b/examples/etc/env-startup/PATH
new file mode 100644
index 0000000..cbd04b7
--- /dev/null
+++ b/examples/etc/env-startup/PATH
@@ -0,0 +1 @@
+/usr/local/bin:/usr/bin:/bin
diff --git a/examples/etc/env-startup/SHELL b/examples/etc/env-startup/SHELL
new file mode 100644
index 0000000..0a59cfa
--- /dev/null
+++ b/examples/etc/env-startup/SHELL
@@ -0,0 +1 @@
+/etc/execline-shell
diff --git a/examples/etc/env-startup/VISUAL b/examples/etc/env-startup/VISUAL
new file mode 100644
index 0000000..7c74f87
--- /dev/null
+++ b/examples/etc/env-startup/VISUAL
@@ -0,0 +1 @@
+vi
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 $@
diff --git a/examples/etc/execline-startup b/examples/etc/execline-startup
new file mode 100755
index 0000000..4afc557
--- /dev/null
+++ b/examples/etc/execline-startup
@@ -0,0 +1,15 @@
+#!/bin/execlineb -S0
+
+/bin/multisubstitute
+{
+  importas -i HOME HOME
+  importas -i LOGNAME LOGNAME
+}
+/bin/export USER ${LOGNAME}
+/bin/s6-envdir /etc/env-startup
+/bin/fdblock 0
+/bin/fdblock 1
+/bin/fdblock 2
+
+/bin/tryexec { ${HOME}/.execline-loginshell $@ }
+/etc/execline-shell $@