lxinitd handbook

lxcoreutils

Lxcoreutils are builtins available in lxinitd based on Linux coreutils.

These are only available to /etc/rc.local, not to rosh. The intention is that basic utils are available to the lxc containers boot process but not available to processes when the container is running. Utils selected are tools that aid in setting up the filesystem and environment for running services. Despite similarities lxcoreutils are simpler reimplementations of Linux coreutils and do not support common options.

lxnohup

Run a process ignoring the SIGHUP signal.

example:

nohup mycrond

lxmkdir

Similar to bash mkdir -p, creates a directory and its intermediate dirs.

example:

lxmkdir /var/run/mycrond

lxrm

Delete files, accepts a list of paths, does not error if the paths are missing.

example:

lxrm /var/run/mycrond/old.pid /var/run/mycrond/other.pid

lxmv

Move a file, does not error if the file is missing.

example:

lxmv /var/log/service.log /var/log/service.${datetime}.log

lxrmdir

Delete directories, must not be empty but does not complain if a directory is missing.

example:

lxrmdir /var/tmp/myspace  /var/tmp/myspool

lxtouch

Create a file if it is missing.

example:

lxtouch /var/run/some.pid

lxchuid

Changes user id and group id of a file. Only accepts ids, not names.

example:

lxchuid 500 500 /var/run/some.pid

lxln

Creates a symbolic link.

lxln /run /var/run

lxmkfifo

Create a first in first out socket.

example:

lxmkfifo /var/myapp/control.fifo

lxmksock

Create a unix socket.

lxmksock /var/myapp/control.sock


by teknopaul