#!/bin/execlineb -P define DEST /proc define CLEANDEST proc define FSTYPE procfs s6-envdir -i /etc/s6/env/path importas -i PATH PATH s6-envdir -i /etc/s6/env/mount.${CLEANDEST} importas -i OPTS OPTS emptyenv export PATH $PATH fdclose 1 fdclose 2 # TODO: Handle procfs being potentially mounted ahead of service execution (initrd) foreground { foreground { exec mkdir -p $DEST } exec mount -t $FSTYPE -o $OPTS procfs $DEST } if -nt { importas status ? test $status -eq 1 }