- Add build-proxmox-iso.sh: remaster Ubuntu ISO with autoinstall config, offline packages, playbook, webapp, and boot files for zero-touch Proxmox VM deployment - Add boot-files/ directory for WinPE boot files (wimboot, boot.wim, BCD, ipxe.efi, etc.) sourced from WestJeff playbook - Update build-usb.sh and test-vm.sh to bundle boot-files automatically - Add usb_root variable to playbook, fix all file copy paths to use it - Unify Apache VirtualHost config (merge default site + webapp proxy) - Add CSRF token protection to all webapp POST forms and API endpoints - Update README with Proxmox deployment instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
129 lines
4.3 KiB
HTML
129 lines
4.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}startnet.cmd Editor - PXE Server Manager{% endblock %}
|
|
|
|
{% block extra_head %}
|
|
<style>
|
|
.cmd-editor {
|
|
font-family: 'Consolas', 'Courier New', monospace;
|
|
font-size: 0.9rem;
|
|
min-height: 400px;
|
|
background-color: #1e1e1e;
|
|
color: #d4d4d4;
|
|
border: 1px solid #333;
|
|
padding: 1rem;
|
|
tab-size: 4;
|
|
white-space: pre;
|
|
line-height: 1.5;
|
|
}
|
|
.cmd-editor:focus {
|
|
outline: none;
|
|
border-color: #0d6efd;
|
|
box-shadow: 0 0 0 0.15rem rgba(13,110,253,.25);
|
|
}
|
|
.wim-info dt {
|
|
font-weight: 600;
|
|
color: #6c757d;
|
|
}
|
|
.wim-info dd {
|
|
margin-bottom: 0.3rem;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h2 class="mb-0"><i class="bi bi-terminal me-2"></i>startnet.cmd Editor</h2>
|
|
</div>
|
|
|
|
{% if not wim_exists %}
|
|
<div class="alert alert-warning">
|
|
<i class="bi bi-exclamation-triangle me-2"></i>
|
|
<strong>boot.wim not found</strong> at <code>{{ wim_path }}</code>.
|
|
Run the PXE server setup playbook and import WinPE boot files first.
|
|
</div>
|
|
{% else %}
|
|
|
|
<div class="row">
|
|
<div class="col-lg-9">
|
|
<div class="card">
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
<span><i class="bi bi-file-earmark-code me-2"></i>Windows\System32\startnet.cmd</span>
|
|
<span class="badge bg-secondary">boot.wim</span>
|
|
</div>
|
|
<div class="card-body p-0">
|
|
<form action="{{ url_for('startnet_save') }}" method="post" id="startnetForm">
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
|
<textarea name="content" class="form-control cmd-editor" id="cmdEditor"
|
|
spellcheck="false">{{ content }}</textarea>
|
|
</form>
|
|
</div>
|
|
<div class="card-footer d-flex justify-content-between align-items-center">
|
|
<small class="text-muted">
|
|
Editing the startnet.cmd inside <code>{{ wim_path }}</code>
|
|
</small>
|
|
<button type="submit" form="startnetForm" class="btn btn-primary">
|
|
<i class="bi bi-floppy me-1"></i> Save to boot.wim
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card mt-3">
|
|
<div class="card-body">
|
|
<h6 class="card-title"><i class="bi bi-info-circle me-1"></i> Common startnet.cmd Commands</h6>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<code class="d-block mb-1">wpeinit</code>
|
|
<small class="text-muted d-block mb-2">Initialize WinPE networking</small>
|
|
<code class="d-block mb-1">net use Z: \\10.9.100.1\winpeapps</code>
|
|
<small class="text-muted d-block mb-2">Map Samba share for deployment</small>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<code class="d-block mb-1">wpeutil WaitForNetwork</code>
|
|
<small class="text-muted d-block mb-2">Wait for network to be ready</small>
|
|
<code class="d-block mb-1">Z:\gea-standard\Deploy\Tools\deploy.cmd</code>
|
|
<small class="text-muted d-block mb-2">Launch deployment script</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-3">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<i class="bi bi-info-square me-2"></i>WIM Info
|
|
</div>
|
|
<div class="card-body wim-info">
|
|
<dl class="mb-0">
|
|
{% for key, val in wim_info.items() %}
|
|
{% if key in ['Image Count', 'Compression', 'Total Bytes', 'Image Name', 'Image Description'] %}
|
|
<dt>{{ key }}</dt>
|
|
<dd>{{ val }}</dd>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% if not wim_info %}
|
|
<p class="text-muted mb-0">Could not read WIM info.</p>
|
|
{% endif %}
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block extra_scripts %}
|
|
<script>
|
|
// Tab key inserts a tab in the editor instead of moving focus
|
|
document.getElementById('cmdEditor')?.addEventListener('keydown', function(e) {
|
|
if (e.key === 'Tab') {
|
|
e.preventDefault();
|
|
var start = this.selectionStart;
|
|
var end = this.selectionEnd;
|
|
this.value = this.value.substring(0, start) + '\t' + this.value.substring(end);
|
|
this.selectionStart = this.selectionEnd = start + 1;
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|