Admin Scripts
What are admin scripts?
NOTE
- Run as admin: You need to be admin user to run the script.
- Basic Usage: To run a script, use the following format:
tl-group-commandparameters (e.g.,tl-hw-prepare /dev/sdb tl-2054) - HELP: Run the command without any arguments to print a quick usage.
- Environment Variables: Customize behavior with environment variables like:
WIFI_NAME='My Network' tl-hw-prepare /dev/sda tl-2054
Script format
How are scripts named?
The scripts follow a naming convention to make them easy to identify and use
- All admin scripts follow a consistent format:
tl-*-*. - Each script begins with the prefix
tl-. - The second part represents the group of commands it belongs
to (e.g.,
hw,img,comp,sys, orusb). - Finally, the third part specifies the specific action or command
within that group (e.g.,
prepare,update, etc.).
Groups of commands
What are the command groups?
[ tl-hw-* ]
Hardware related commands
Hardware related commands (partitioning, installing components, updating bootloaders).
-
tl-hw-prepare: Creates partitions and installs components for TechLit system. -
Takes hard drive and tag as parameters.
-
Example
tl-hw-prepare /dev/sdX tl-2054 -
tl-hw-update-desktop: Unpacks Techlit system archive with the version provided into already-provisioned desktop system on/dev/sdX- Takes hard drive and version(optional) as parameters. exampletl-hw-update-desktop /dev/sdX -
tl-hw-update-bootloader: Installs and configures bootloaders for the on/dev/sdx -
tl-hw-chroot-desktop: Mounts required partitions and chroots into TechLit system on/dev/sdx
Examples
See command examples
Some examples of some common command usage
Install
- A Techlit system for the first time on a computer
with a hard drive
/dev/sdaand tagtl-2054
tl-hw-prepare /dev/sda tl-2054- With environment variables
WIFI_NAME="TechLit Vim" tl-hw-prepare /dev/sda tl-2054Update
- A Techlit system from a desktop image hosted in
/dev/sda
tl-hw-update-desktop /dev/sdaReconfigure
- A TechLit system first time after preparing
tl-sys-configureFix Bootloader
- On a TechLit Computer unable to boot because of bootloader or wrong fstab by
reinstalling Grub bootloader on a TechLit system installed at
/dev/sda
sudo tl-hw-update-bootloader /dev/sda