Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 # | |
| 5 # Starts an sshd daemon for developer builds. | |
| 4 | 6 |
| 5 start on started connman | 7 start on stopped dump-boot-stats |
|
gauravsh
2010/03/12 21:59:45
Any specific reason for starting this late? (I am
sosa
2010/03/12 22:01:32
Ssh server is a development mode specific upstart
| |
| 6 respawn | 8 respawn |
| 7 expect fork | 9 expect fork |
| 8 exec /usr/sbin/sshd | |
| 9 | 10 |
| 10 | 11 # TODO(sosa@chromium.org) - Remove old style once switched to new dev_mode |
| 12 if [ -f /root/.dev_mode ] ; then | |
| 13 exec /usr/local/sbin/sshd | |
| 14 else | |
| 15 exec /usr/sbin/sshd | |
| 16 fi | |
| 11 | 17 |
| 12 pre-start script | 18 pre-start script |
| 13 | 19 |
| 14 mkdir -p /mnt/stateful_partition/etc/ssh | 20 mkdir -p /mnt/stateful_partition/etc/ssh |
| 15 | 21 |
| 16 if [ ! -f /mnt/stateful_partition/etc/ssh/ssh_host_rsa_key ] ; then | 22 if [ ! -f /mnt/stateful_partition/etc/ssh/ssh_host_rsa_key ] ; then |
| 17 echo Generating v2 RSA key | 23 echo Generating v2 RSA key |
| 18 ssh-keygen -q -f /mnt/stateful_partition/etc/ssh/ssh_host_rsa_key -N '' -t rs a | 24 ssh-keygen -q -f /mnt/stateful_partition/etc/ssh/ssh_host_rsa_key -N '' -t rs a |
| 19 fi | 25 fi |
| 20 | 26 |
| 21 | 27 |
| 22 if [ ! -f /mnt/stateful_partition/etc/ssh/ssh_host_dsa_key ] ; then | 28 if [ ! -f /mnt/stateful_partition/etc/ssh/ssh_host_dsa_key ] ; then |
| 23 echo Generating v2 DSA key | 29 echo Generating v2 DSA key |
| 24 ssh-keygen -q -f /mnt/stateful_partition/etc/ssh/ssh_host_dsa_key -N '' -t ds a | 30 ssh-keygen -q -f /mnt/stateful_partition/etc/ssh/ssh_host_dsa_key -N '' -t ds a |
| 25 fi | 31 fi |
| 26 | 32 |
| 27 end script | 33 end script |
| 28 | 34 |
| 29 | 35 |
| OLD | NEW |