we depend on coreutils (chmod, etc.)
svn path=/nixpkgs/trunk/; revision=4410
This commit is contained in:
parent
ae1c5fa88f
commit
57067bba9e
@ -5,4 +5,5 @@ ensureDir $out
|
|||||||
sed -e "s^@bash\@^$bash^g" \
|
sed -e "s^@bash\@^$bash^g" \
|
||||||
-e "s^@sshd\@^$ssh^g" \
|
-e "s^@sshd\@^$ssh^g" \
|
||||||
-e "s^@initscripts\@^$initscripts^g" \
|
-e "s^@initscripts\@^$initscripts^g" \
|
||||||
|
-e "s^@coreutils\@^$coreutils^g" \
|
||||||
< $script > $out/control
|
< $script > $out/control
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{stdenv, ssh, bash, initscripts, key ? null}:
|
{stdenv, ssh, bash, initscripts, coreutils, key ? null}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "ssh-script-0.0.1";
|
name = "ssh-script-0.0.1";
|
||||||
server = "ssh";
|
server = "ssh";
|
||||||
builder = ./builder.sh ;
|
builder = ./builder.sh ;
|
||||||
inherit bash ssh initscripts;
|
inherit bash ssh initscripts coreutils;
|
||||||
script = [./sshd];
|
script = [./sshd];
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,8 @@ do_rsa1_keygen() {
|
|||||||
if [ ! -s $RSA1_KEY ]; then
|
if [ ! -s $RSA1_KEY ]; then
|
||||||
echo -n $"Generating SSH1 RSA host key: "
|
echo -n $"Generating SSH1 RSA host key: "
|
||||||
if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
|
if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
|
||||||
chmod 600 $RSA1_KEY
|
@coreutils/bin/chmod 600 $RSA1_KEY
|
||||||
chmod 644 $RSA1_KEY.pub
|
@coreutils@/bin/chmod 644 $RSA1_KEY.pub
|
||||||
success $"RSA1 key generation"
|
success $"RSA1 key generation"
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
@ -49,8 +49,8 @@ do_rsa_keygen() {
|
|||||||
if [ ! -s $RSA_KEY ]; then
|
if [ ! -s $RSA_KEY ]; then
|
||||||
echo -n $"Generating SSH2 RSA host key: "
|
echo -n $"Generating SSH2 RSA host key: "
|
||||||
if $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
|
if $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
|
||||||
chmod 600 $RSA_KEY
|
@coreutils@/bin/chmod 600 $RSA_KEY
|
||||||
chmod 644 $RSA_KEY.pub
|
@coreutils@/bin/chmod 644 $RSA_KEY.pub
|
||||||
success $"RSA key generation"
|
success $"RSA key generation"
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
@ -65,8 +65,8 @@ do_dsa_keygen() {
|
|||||||
if [ ! -s $DSA_KEY ]; then
|
if [ ! -s $DSA_KEY ]; then
|
||||||
echo -n $"Generating SSH2 DSA host key: "
|
echo -n $"Generating SSH2 DSA host key: "
|
||||||
if $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
|
if $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
|
||||||
chmod 600 $DSA_KEY
|
@coreutils@/bin/chmod 600 $DSA_KEY
|
||||||
chmod 644 $DSA_KEY.pub
|
@coreutils@/bin/chmod 644 $DSA_KEY.pub
|
||||||
success $"DSA key generation"
|
success $"DSA key generation"
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user