Problem running shell command in spawn()
by Mark Reynolds
This code used to work for a long time, but now it stopped working as
expected:
let cmd = [
"/bin/sh",
"-c",
'/usr/bin/echo TEST >> ' + setup_file
];
cockpit.spawn (cmd, { superuser: true, err: "message" })
Now the output file (setup_file) is empty.
When I run that command on F33 it also does not write to the file. Ok,
so I changed it to just "echo STRING >> /tmp/my_file" which works on the
command line, but in Cockpit spawn it still does not write/echo to the file:
let cmd = [
'/usr/bin/echo TEST >> ' + setup_file
];
cockpit.spawn (cmd, { superuser: true, err: "message" })
I've tried different variations of this command, but none of them
actually write (or echo) to the file whne using spawn(). I also tried
"script(), but it didn't help. This used to work until just recently,
so I'm not sure what is wrong or what changed in Cockpit/Fedora...
Any suggestions would be great.
Thanks,
Mark
--
Directory Server Development Team
2 years, 8 months
CentOS Stream 8 Cockpit version
by Paul Richards
Hello,
I've noticed that the version of Cockpit in CentOS Stream 8 is much
newer than other "stable" distros:
CentOS Stream 8: 250
Ubuntu 20.04: 215
Debian 11: 239
I know that Cockpit is a RedHat project, so perhaps this isn't too
surprising, but is the policy around CentOS Stream updates for Cockpit
explicitly documented somewhere? Will CentOS Stream always have a
relatively up to date version of Cockpit?
Thanks,
2 years, 8 months