Skip to content

Commit 9d76902

Browse files
committed
test
1 parent ae1b21b commit 9d76902

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

dist/index.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31127,7 +31127,6 @@ function waitFor(trigger, callback) {
3112731127
function setup_sshkey(pubkey, qemu_process, ready_callback) {
3112831128
const pubkeyContent = fs.readFileSync(pubkey, { encoding: "utf-8" });
3112931129
show_message("info", "Setting up SSH key for QEMU");
31130-
qemu_process.stdin.write("root\n");
3113131130
let waitForPrompt = waitFor("root@freebsd:", () => {
3113231131
waitForPrompt = () => { }
3113331132
let waitForKey = waitFor(pubkeyContent, () => {
@@ -31139,18 +31138,17 @@ function setup_sshkey(pubkey, qemu_process, ready_callback) {
3113931138
waitForKey(data)
3114031139
})
3114131140
show_message("debug", "Writing to stdin")
31142-
qemu_process.stdin.write(`echo "${pubkeyContent}" > /root/.ssh/authorized_keys\n`, () => {
31143-
qemu_process.stdin.write(`cat /root/.ssh/authorized_keys\n`, () => {
31144-
qemu_process.stdin.write("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config\n", () => {
31145-
qemu_process.stdin.write("/etc/rc.d/sshd restart\n");
31146-
});
31147-
});
31148-
});
31141+
// qemu_process.stdin.write(`echo "${pubkeyContent}" > /root/.ssh/authorized_keys\n`, () => {
31142+
// qemu_process.stdin.write(`cat /root/.ssh/authorized_keys\n`, () => {
31143+
qemu_process.stdin.write("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && /etc/rc.d/sshd restart\n");
31144+
// });
31145+
// });
3114931146
})
3115031147
qemu_process.stdout.on('data', (data) => {
3115131148
waitForPrompt(data)
3115231149
process.stdout.write(data.toString())
3115331150
});
31151+
qemu_process.stdin.write("root\n");
3115431152
}
3115531153

3115631154
function ensure_install_deps() {

index.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ function waitFor(trigger, callback) {
237237
function setup_sshkey(pubkey, qemu_process, ready_callback) {
238238
const pubkeyContent = fs.readFileSync(pubkey, { encoding: "utf-8" });
239239
show_message("info", "Setting up SSH key for QEMU");
240-
qemu_process.stdin.write("root\n");
241240
let waitForPrompt = waitFor("root@freebsd:", () => {
242241
waitForPrompt = () => { }
243242
let waitForKey = waitFor(pubkeyContent, () => {
@@ -249,18 +248,17 @@ function setup_sshkey(pubkey, qemu_process, ready_callback) {
249248
waitForKey(data)
250249
})
251250
show_message("debug", "Writing to stdin")
252-
qemu_process.stdin.write(`echo "${pubkeyContent}" > /root/.ssh/authorized_keys\n`, () => {
253-
qemu_process.stdin.write(`cat /root/.ssh/authorized_keys\n`, () => {
254-
qemu_process.stdin.write("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config\n", () => {
255-
qemu_process.stdin.write("/etc/rc.d/sshd restart\n");
256-
});
257-
});
258-
});
251+
// qemu_process.stdin.write(`echo "${pubkeyContent}" > /root/.ssh/authorized_keys\n`, () => {
252+
// qemu_process.stdin.write(`cat /root/.ssh/authorized_keys\n`, () => {
253+
qemu_process.stdin.write("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && /etc/rc.d/sshd restart\n");
254+
// });
255+
// });
259256
})
260257
qemu_process.stdout.on('data', (data) => {
261258
waitForPrompt(data)
262259
process.stdout.write(data.toString())
263260
});
261+
qemu_process.stdin.write("root\n");
264262
}
265263

266264
function ensure_install_deps() {

0 commit comments

Comments
 (0)