#!/bin/bash
# Author: Steven Shiau <steven _at_ nchc org tw>
# License: GPL
# Program to create Clonezilla live.

# load config file
. /ocs-live.conf
# load functions
. /ocs-live-hook-functions 

# set root passwd, I do not like root without passwd.
set_root_passwd

# put the clonezilla live script in rc2.d
move_ocs_live_startup_to_rc2.d

# clean unnecessary backup file to save space
clean_unnecessary_backup_file_in_boot

# since ssh services is on, and casper is known for the whole world, we have to block it.
block_all_clients_by_tcpwrapper

# some required modules at startup
append_mod_in_etc_modules

# run localepurge
set_localepurge
localepurge

### THE END ###
# DO NOT PUT SCRIPT AFTHER THIS!!!
# kill this program before creating squashfs filesystem.
clean_ocs_hook_files_in_chroot
