Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Cc: "W. Trevor King" <wking@×××××××.us>
Subject: Re: [gentoo-catalyst] [PATCH] livecdfs-update.sh: Fix '/etc/sshd' check for sshd_config tweaks
Date: Sun, 03 Mar 2013 16:14:05
Message-Id: 1362327217.25081.12.camel@big_daddy.dol-sen.ca
In Reply to: [gentoo-catalyst] [PATCH] livecdfs-update.sh: Fix '/etc/sshd' check for sshd_config tweaks by "W. Trevor King"
1 On Sun, 2013-03-03 at 08:01 -0500, W. Trevor King wrote:
2 > From: "W. Trevor King" <wking@×××××××.us>
3 >
4 > sshd_config lives in /etc/ssh, not /etc/sshd. This typo has been
5 > present since the block was introduced by c06264e (Initial import of
6 > Catalyst 2.0.0, 2005-04-04), so it's obviously not a widely used
7 > feature ;). It might be better to just remove the block entirely.
8 > ---
9 > targets/support/livecdfs-update.sh | 2 +-
10 > 1 file changed, 1 insertion(+), 1 deletion(-)
11 > mode change 100644 => 100755 targets/support/livecdfs-update.sh
12 >
13 > diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
14 > old mode 100644
15 > new mode 100755
16 > index 77d694e..f4b2c45
17 > --- a/targets/support/livecdfs-update.sh
18 > +++ b/targets/support/livecdfs-update.sh
19 > @@ -5,7 +5,7 @@ RUN_DEFAULT_FUNCS="no"
20 > source /tmp/chroot-functions.sh
21 >
22 > # Allow root logins to our CD by default
23 > -if [ -e /etc/sshd/sshd_config ]
24 > +if [ -e /etc/ssh/sshd_config ]
25 > then
26 > sed -i 's:^#PermitRootLogin\ yes:PermitRootLogin\ yes:' \
27 > /etc/ssh/sshd_config
28
29
30 It would be better to move the hard coding out of the bash script and
31 either into the config defaults or in this case (it's only used in the
32 one target) added to the target stage py file. In that way the default
33 value can be overwritten in the target spec file.

Replies