fix: default admin user to 'lab', case-insensitive OS detection for iSCSI
Some checks failed
Some checks failed
- Firstboot script defaults admin user to 'lab' instead of bastion's config.adminUser (which was 'michal' from host system) - iSCSI OS detection uses case-insensitive match for 'fedora' Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -154,7 +154,7 @@ fi
|
|||||||
const hostname = request.query.hostname ?? "unknown";
|
const hostname = request.query.hostname ?? "unknown";
|
||||||
const role = (request.query.role ?? "infra") as Role;
|
const role = (request.query.role ?? "infra") as Role;
|
||||||
const mac = request.query.mac ?? "unknown";
|
const mac = request.query.mac ?? "unknown";
|
||||||
const user = request.query.user ?? config.adminUser;
|
const user = request.query.user ?? "lab";
|
||||||
|
|
||||||
const script = renderFirstbootScript({
|
const script = renderFirstbootScript({
|
||||||
hostname,
|
hostname,
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ export const enableIscsi: Operation = async (ctx): Promise<OperationResult> => {
|
|||||||
|
|
||||||
// Install the package (detect distro)
|
// Install the package (detect distro)
|
||||||
const osRelease = await ctx.ssh.exec("cat /etc/os-release", sshOpts(ctx));
|
const osRelease = await ctx.ssh.exec("cat /etc/os-release", sshOpts(ctx));
|
||||||
const isFedora = osRelease.stdout.includes("fedora") || osRelease.stdout.includes("rhel") || osRelease.stdout.includes("centos");
|
const osLower = osRelease.stdout.toLowerCase();
|
||||||
|
const isFedora = osLower.includes("fedora") || osLower.includes("rhel") || osLower.includes("centos");
|
||||||
|
|
||||||
const pkg = isFedora ? "iscsi-initiator-utils" : "open-iscsi";
|
const pkg = isFedora ? "iscsi-initiator-utils" : "open-iscsi";
|
||||||
const installCmd = isFedora ? `dnf install -y ${pkg}` : `apt-get install -y ${pkg}`;
|
const installCmd = isFedora ? `dnf install -y ${pkg}` : `apt-get install -y ${pkg}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user