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
|
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()
|
# clearly specify the right working directory, used in the python script as os.getcwd()
|
||||||
cd /mnt
|
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
|
stty echo
|
||||||
END
|
END
|
||||||
#TODO add some useful commands
|
#TODO add some useful commands
|
||||||
|
|
|
@ -10,7 +10,7 @@ set -x
|
||||||
|
|
||||||
install_dependencies() {
|
install_dependencies() {
|
||||||
apt update
|
apt update
|
||||||
apt install -y wget dnsmasq nfs-kernel-server
|
apt install -y wget dnsmasq nfs-kernel-server rsync
|
||||||
}
|
}
|
||||||
|
|
||||||
backup_file() {
|
backup_file() {
|
||||||
|
@ -32,7 +32,7 @@ END
|
||||||
|
|
||||||
if [ ! -f "${nfs_path}/settings.ini" ]; then
|
if [ ! -f "${nfs_path}/settings.ini" ]; then
|
||||||
if [ -f "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
|
else
|
||||||
echo "ERROR: ../settings.ini does not exist yet, cannot read config from there. You can take inspiration with file ../settings.ini.example"
|
echo "ERROR: ../settings.ini does not exist yet, cannot read config from there. You can take inspiration with file ../settings.ini.example"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -56,7 +56,7 @@ END
|
||||||
extract_live_parts_for_tftp() {
|
extract_live_parts_for_tftp() {
|
||||||
cp -fv "${PXE_DIR}/../iso/staging/live/vmlinuz" "${tftp_path}/"
|
cp -fv "${PXE_DIR}/../iso/staging/live/vmlinuz" "${tftp_path}/"
|
||||||
cp -fv "${PXE_DIR}/../iso/staging/live/initrd" "${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() {
|
install_netboot() {
|
||||||
|
|
Loading…
Reference in a new issue