Tiny Core Linux
Tiny Core Extensions => TCE Bugs => Topic started by: aw on September 16, 2015, 10:21:11 AM
-
Hi,
I noticed a small error in the openssh.ini file of the x86/openssh extension - http://repo.tinycorelinux.net/6.x/x86/tcz/src/openssh/openssh.ini
The following lines:
[ -f /usr/local/etc/ssh/ssh_config ] || cp /usr/local/etc/ssh/sshd_config.example /usr/local/etc/ssh/sshd_config
[ -f /usr/local/etc/ssh/sshd_config ] || cp /usr/local/etc/ssh/ssh_config.example /usr/local/etc/ssh/ssh_config
.. should look like
[ -f /usr/local/etc/ssh/sshd_config ] || cp /usr/local/etc/ssh/sshd_config.example /usr/local/etc/ssh/sshd_config
[ -f /usr/local/etc/ssh/ssh_config ] || cp /usr/local/etc/ssh/ssh_config.example /usr/local/etc/ssh/ssh_config
-
Would be better to publish a diff file instead of asking readers to compare old and new script to find what is changed
:(
-
both lines changed, diff wouldn't have added any easier to see information.
-
it's not an .ini file though, but /usr/local/etc/init.d/openssh
^ i take that back, i didn't see those source files before.
-
Sure!
--- openssh.ini.old 2015-09-16 14:46:22.000000000 +0000
+++ openssh.ini 2015-09-16 14:46:33.000000000 +0000
@@ -4,8 +4,8 @@
start(){
[ -f /usr/local/etc/ssh ] || mkdir -p /usr/local/etc/ssh
- [ -f /usr/local/etc/ssh/ssh_config ] || cp /usr/local/etc/ssh/sshd_config.example /usr/local/etc/ssh/sshd_config
- [ -f /usr/local/etc/ssh/sshd_config ] || cp /usr/local/etc/ssh/ssh_config.example /usr/local/etc/ssh/ssh_config
+ [ -f /usr/local/etc/ssh/sshd_config ] || cp /usr/local/etc/ssh/sshd_config.example /usr/local/etc/ssh/sshd_config
+ [ -f /usr/local/etc/ssh/ssh_config ] || cp /usr/local/etc/ssh/ssh_config.example /usr/local/etc/ssh/ssh_config
[ -f /usr/local/etc/ssh/ssh_host_rsa_key ] || ssh-keygen -t rsa -N "" -f /usr/local/etc/ssh/ssh_host_rsa_key
[ -f /usr/local/etc/ssh/ssh_host_dsa_key ] || ssh-keygen -t dsa -N "" -f /usr/local/etc/ssh/ssh_host_dsa_key
[ -f /usr/local/etc/ssh/ssh_host_ecdsa_key ] || ssh-keygen -t ecdsa -N "" -f /usr/local/etc/ssh/ssh_host_ecdsa_key
Apply with patch < openssh.patch
-
Well, I mean pointing to the difference and explaining the change not the diff command itself, not to push readers to find it himself. It is not the way to convince people about changes.
-
Hi bmarkus
[ -f /usr/local/etc/ssh/ssh_config ] || cp /usr/local/etc/ssh/sshd_config.example /usr/local/etc/ssh/sshd_config
[ -f /usr/local/etc/ssh/sshd_config ] || cp /usr/local/etc/ssh/ssh_config.example /usr/local/etc/ssh/ssh_config
It's testing for the wrong file to determine whether the copy operation should take place. The names in the test are
reversed.
-
you said "diff file"
anyways, the change fixes that sshd config gets overwritten by ssh config if ssh config doesn't exist but sshd does, vice-versa.
-
Hi hiro
you said "diff file"
Regardless, two short sentences as I posted would have gone a long way to make it clear why the OP felt this change
was necessary.
-
Thanks, noted for future reference.
-
anyways, good catch, aw.