source: ipk/source.sh4/network_dropbear/CONTROL/postinst @ 34137

Last change on this file since 34137 was 34137, checked in by tobayer, 6 years ago

[titan] add dropbear ssh for sh4

File size: 924 bytes
Line 
1#!/bin/sh
2INSTDIR="$1"
3
4ln -sf $INSTDIR/bin/dropbearmulti /mnt/swapextensions/bin/dropbear
5ln -sf $INSTDIR/bin/dropbearmulti /mnt/swapextensions/bin/dbclient
6ln -sf $INSTDIR/bin/dropbearmulti /mnt/swapextensions/bin/dropbearkey
7ln -sf $INSTDIR/bin/dropbearmulti /mnt/swapextensions/bin/dropbearconvert
8ln -sf $INSTDIR/bin/dropbearmulti /mnt/swapextensions/bin/ssh
9ln -sf $INSTDIR/bin/dropbearmulti /mnt/swapextensions/bin/scp
10
11ln -s $INSTDIR/bin/sftp-server /mnt/swapextensions/bin/sftp-server > /dev/null
12
13mkdir -p /var/.ssh
14mkdir -p /mnt/dropbear
15
16if [ ! -e /mnt/dropbear/dropbear_rsa_host_key ]; then
17        dropbearkey -t rsa -s 2048 -f /mnt/dropbear/dropbear_rsa_host_key
18fi
19
20grep dropbear /var/etc/inetd.conf > /dev/null
21if [ $? = 1 ]; then
22        killall -9 inetd > /dev/null
23        echo "22 stream tcp nowait root /mnt/swapextensions/bin/dropbear dropbear -i -a -B -p 22" >> /var/etc/inetd.conf
24        /usr/sbin/inetd > /dev/null
25fi
26
27exit 0
Note: See TracBrowser for help on using the repository browser.