add:buildroot

This commit is contained in:
eng33
2023-11-10 19:30:33 +08:00
committed by luckfox-eng33
parent f840ab9fe6
commit 3958ea65e5
32 changed files with 324 additions and 4054 deletions

View File

@@ -0,0 +1,48 @@
#!/bin/sh
#
# sshd Starts sshd.
#
# Make sure the ssh-keygen progam exists
[ -f /usr/bin/ssh-keygen ] || exit 0
umask 077
start() {
chown root:root /var/empty/
# Create any missing keys
/usr/bin/ssh-keygen -A
printf "Starting sshd: "
/usr/sbin/sshd
touch /var/lock/sshd
echo "OK"
}
stop() {
printf "Stopping sshd: "
killall sshd
rm -f /var/lock/sshd
echo "OK"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?