Compare commits
3 commits
32917338a8
...
c2848c265a
Author | SHA1 | Date | |
---|---|---|---|
c2848c265a | |||
4bdc55b46d | |||
10e99fdcab |
|
@ -269,7 +269,13 @@ stty -echo # Do not show what we type in terminal so it does not meddle with our
|
|||
dmesg -n 1 # Do not report *useless* system messages to the terminal
|
||||
# clearly specify the right working directory, used in the python script as os.getcwd()
|
||||
cd /mnt
|
||||
pipenv run python /opt/workbench/workbench-script.py --config "/mnt/settings/settings.ini"
|
||||
# detect pxe env
|
||||
if [ -d /run/live/medium ]; then
|
||||
config_path='/run/live/medium/settings.ini'
|
||||
else
|
||||
config_path='/mnt/settings.ini'
|
||||
fi
|
||||
pipenv run python /opt/workbench/workbench-script.py --config "\${config_path}"
|
||||
stty echo
|
||||
END
|
||||
#TODO add some useful commands
|
||||
|
|
|
@ -10,7 +10,7 @@ set -x
|
|||
|
||||
install_dependencies() {
|
||||
apt update
|
||||
apt install -y wget dnsmasq nfs-kernel-server
|
||||
apt install -y wget dnsmasq nfs-kernel-server rsync
|
||||
}
|
||||
|
||||
backup_file() {
|
||||
|
@ -32,7 +32,7 @@ END
|
|||
|
||||
if [ ! -f "${nfs_path}/settings.ini" ]; then
|
||||
if [ -f "settings.ini" ]; then
|
||||
ln -sfv "$(pwd)/settings.ini"" ${nfs_path}/settings.ini"
|
||||
cp settings.ini "${nfs_path}/settings.ini"
|
||||
else
|
||||
echo "ERROR: ../settings.ini does not exist yet, cannot read config from there. You can take inspiration with file ../settings.ini.example"
|
||||
exit 1
|
||||
|
@ -56,7 +56,7 @@ END
|
|||
extract_live_parts_for_tftp() {
|
||||
cp -fv "${PXE_DIR}/../iso/staging/live/vmlinuz" "${tftp_path}/"
|
||||
cp -fv "${PXE_DIR}/../iso/staging/live/initrd" "${tftp_path}/"
|
||||
ln -sfv "${nfs_path}/live/" "${PXE_DIR}/../iso/staging/live/filesystem.squashfs"
|
||||
rsync -av "${PXE_DIR}/../iso/staging/live/filesystem.squashfs" "${nfs_path}/live/"
|
||||
}
|
||||
|
||||
install_netboot() {
|
||||
|
|
Loading…
Reference in a new issue