m4_changequote()
kathara-lab-dirs(7) -- Network scenario directory structure
=============================================

## DESCRIPTION

A generic network scenario directory `lab-path` should have the following structure.

* `lab-path/lab.conf`:
	See `kathara-lab.conf`(5)

* `lab-path/lab.dep`:
	See `kathara-lab.dep`(5)

* `lab-path/lab.ext`:
	See `kathara-lab.ext`(5)

* `lab-path/device/`:
	Each subdirectory inside `lab-path` represents a device to be started, whose name will be the same as the one of the subdirectory.

	Optionally, this subdirectory may contain files that you wish to copy inside the device filesystem. You can also put a full hierarchy of directories here. When organizing files inside `lab-path/device/`, think of it as if it were the root (`/`) directory of the device. For example, a file `lab-path/device/foo` will be copied into `/foo` inside the device.

* `lab-path/device.startup`:
	This file is a shell script that will be launched during the startup of the device. This file may be useful, for example, to automatically setup IP addresses for network interfaces. It is not required to assign this script the executable permission.

	Note that this script is executed by using the `device_shell` value specified in `kathara.conf`(5) as interpreter. If you would like to use a different interpreter, change it inside `kathara.conf`(5) or with `kathara-settings`(1).

* `lab-path/device.shutdown`:
	This file is a shell script that will be executed when the device is halted. It is not required to assign this script the executable permission. 

	Note that this script is executed by using the `device_shell` value specified in `kathara.conf`(5) as interpreter. If you would like to use a different interpreter, change it inside `kathara.conf`(5) or with `kathara-settings`(1).

* `lab-path/shared/`:
	This is a shared folder between the host and all the network scenario devices. This could be useful to transfer files between the host and a device or viceversa.

* `lab-path/shared.startup`
	This is a shell script that will be run on every device just before `lab-path/device.startup`. It is not required to assign this script the executable permission.

	Note that this script is executed by using the `device_shell` value specified in `kathara.conf`(5) as interpreter. If you would like to use a different interpreter, change it inside `kathara.conf`(5) or with `kathara-settings`(1).

* `lab-path/shared.shutdown`
	This is a shell script that will be run on every device just after `lab-path/device.shutdown`. It is not required to assign this script the executable permission.
	
	Note that this script is executed by using the `device_shell` value specified in `kathara.conf`(5) as interpreter. If you would like to use a different interpreter, change it inside `kathara.conf`(5) or with `kathara-settings`(1).

* `lab-path/_test/`
	This subdirectory contains information for performing a test of the network scenario. It may be automatically created by `kathara-ltest`(1) or may contain user created files describing customized tests. For more information about this directory, see `kathara-ltest`(1).

m4_include(footer.txt)

## SEE ALSO

`kathara`(1), `kathara-lstart`(1), [Kathara official site](https://www.kathara.org)