2022-03-21 12:25:55 +00:00
|
|
|
#!/bin/execlineb -P
|
2022-11-26 13:36:37 +00:00
|
|
|
define DEST /tmp
|
|
|
|
define CLEANDEST tmp
|
|
|
|
define FSTYPE tmpfs
|
|
|
|
|
2022-10-18 19:06:48 +00:00
|
|
|
s6-envdir -i /etc/s6/env/path
|
2022-03-21 12:25:55 +00:00
|
|
|
importas -i PATH PATH
|
2022-11-26 13:36:37 +00:00
|
|
|
|
|
|
|
s6-envdir -i /etc/s6/env/mount.${CLEANDEST}
|
2022-10-18 19:06:48 +00:00
|
|
|
importas -i OPTS OPTS
|
2022-11-26 13:36:37 +00:00
|
|
|
|
2022-03-21 12:25:55 +00:00
|
|
|
emptyenv
|
|
|
|
|
|
|
|
export PATH $PATH
|
|
|
|
|
2022-08-31 09:33:18 +00:00
|
|
|
fdclose 1
|
|
|
|
fdclose 2
|
|
|
|
|
2022-11-26 13:36:37 +00:00
|
|
|
# TODO: Handle tmpfs being potentially mounted ahead of service execution (initrd)
|
2022-03-21 12:25:55 +00:00
|
|
|
foreground {
|
2022-10-18 19:06:48 +00:00
|
|
|
foreground {
|
2022-10-21 18:41:16 +00:00
|
|
|
exec mkdir -p $DEST
|
|
|
|
} exec mount -t $FSTYPE -o $OPTS tmp $DEST
|
2022-03-21 12:25:55 +00:00
|
|
|
} if -nt {
|
|
|
|
importas status ? test $status -eq 1
|
|
|
|
}
|