gcc484ntopperl-5.22
Last change
on this file since c5c522c was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100644
|
File size:
943 bytes
|
Line | |
---|
1 | config() { |
---|
2 | NEW="$1" |
---|
3 | OLD="`dirname $NEW`/`basename $NEW .new`" |
---|
4 | # If there's no config file by that name, mv it over: |
---|
5 | if [ ! -r $OLD ]; then |
---|
6 | mv $NEW $OLD |
---|
7 | elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy |
---|
8 | rm $NEW |
---|
9 | fi |
---|
10 | # Otherwise, we leave the .new copy for the admin to consider... |
---|
11 | } |
---|
12 | |
---|
13 | config etc/ssh/ssh_config.new |
---|
14 | config etc/ssh/sshd_config.new |
---|
15 | |
---|
16 | # If the sshd user/group don't exist, add them: |
---|
17 | if grep "^sshd:x:" etc/passwd 1> /dev/null 2> /dev/null ; then |
---|
18 | true |
---|
19 | else |
---|
20 | echo "sshd:x:33:33:sshd:/:" >> etc/passwd |
---|
21 | fi |
---|
22 | if grep "^sshd::" etc/group 1> /dev/null 2> /dev/null ; then |
---|
23 | true |
---|
24 | else |
---|
25 | echo "sshd::33:sshd" >> etc/group |
---|
26 | fi |
---|
27 | if grep "^sshd:" etc/shadow 1> /dev/null 2> /dev/null ; then |
---|
28 | true |
---|
29 | else |
---|
30 | echo "sshd:*:9797:0:::::" >> etc/shadow |
---|
31 | fi |
---|
32 | |
---|
33 | # Add a btmp file to store login failure if one doesn't exist: |
---|
34 | if [ ! -r var/log/btmp ]; then |
---|
35 | ( cd var/log ; umask 077 ; touch btmp ) |
---|
36 | fi |
---|
37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.