Examples

[main]     [download]   [tutorial]     [documentation]     [examples]

This is a small example of how to use LUCI to edit variables in a file, here the file "/etc/init.d/network" on a Debian system (network base configuration). On the right, you have the file to edit, and on the left, the corresponding LUCI window. The description file used by LUCI to edit this file uses the basic parameters of LUCI. Each entry in the window has a short description that pops up as a tool tip (using the optional description parameter in the description file).

LUCI network
	      screenshot #! /bin/sh

ifconfig lo 127.0.0.1
route add -net 127.0.0.0
IPADDR=192.168.0.77
NETMASK=255.255.254.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
GATEWAY=162.168.0.1
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1

Valid HTML 4.0!