forked from Sysdeploy/openwrt
Compare commits
2 Commits
1e60f1fd33
...
11ac4e1672
Author | SHA1 | Date |
---|---|---|
Peter Šurda | 11ac4e1672 | |
Peter Šurda | 85c081df3d |
|
@ -44,16 +44,18 @@ cp ${sdkdir}/bin/packages/aarch64_cortex-a72/quectel/*.ipk packages/
|
|||
|
||||
make info
|
||||
|
||||
# Double the size of the root partition
|
||||
echo "CONFIG_TARGET_ROOTFS_PARTSIZE=208" >> .config
|
||||
# Increase the size of the root partition
|
||||
echo "CONFIG_TARGET_ROOTFS_PARTSIZE=308" >> .config
|
||||
# Disable ext4 images
|
||||
echo "CONFIG_TARGET_ROOTFS_EXT4FS=n" >> .config
|
||||
# Enable collectd network encryption
|
||||
echo ""PACKAGE_COLLECTD_ENCRYPTED_NETWORK=y" >> .config"
|
||||
|
||||
# Setup files
|
||||
mkdir -p files/root/.ssh
|
||||
chmod 0700 files/root files/root/.ssh
|
||||
cp ${pwd}/authorized_keys files/root/.ssh/
|
||||
chmod 0400 files/root/.ssh/authorized_keys
|
||||
mkdir -p files/etc/dropbear
|
||||
chmod 0750 files/etc/dropbear
|
||||
cp ${pwd}/authorized_keys files/etc/dropbear
|
||||
chmod 0400 files/etc/dropbear/authorized_keys
|
||||
mkdir -p files/etc/uci-defaults
|
||||
cp ${pwd}/defaults/* files/etc/uci-defaults
|
||||
|
||||
|
@ -69,7 +71,7 @@ PACKAGES="kmod-nf-nathelper-extra kmod-rtc-ds1307 \
|
|||
asterisk-chan-quectel \
|
||||
ca-certificates \
|
||||
collectd collectd-mod-contextswitch collectd-mod-cpu \
|
||||
collectd-mod-curl \
|
||||
collectd-mod-curl collectd-mod-df \
|
||||
collectd-mod-dhcpleases collectd-mod-disk \
|
||||
collectd-mod-dns collectd-mod-entropy \
|
||||
collectd-mod-ethstat collectd-mod-exec \
|
||||
|
@ -89,8 +91,9 @@ PACKAGES="kmod-nf-nathelper-extra kmod-rtc-ds1307 \
|
|||
luci-app-mwan3 luci-app-upnp \
|
||||
luci-ssl-nginx luci-app-acme \
|
||||
python3-packages python3-yaml \
|
||||
openssh-sftp-server tcpdump \
|
||||
iptables-nft ip6tables-nft \
|
||||
wireguard-tools wget-ssl \
|
||||
openssh-server \
|
||||
"
|
||||
|
||||
make image PROFILE=rpi-4 \
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
touch /etc/config/defaults
|
||||
|
||||
/sbin/uci get defaults.version || /sbin/uci set defaults.version=version && \
|
||||
/sbin/uci commit defaults
|
|
@ -0,0 +1,17 @@
|
|||
VERSION=1
|
||||
|
||||
[ "$(uci -q get defaults.version.dropbear)" -ge "$VERSION" ] && exit 0
|
||||
|
||||
# save version
|
||||
/sbin/uci set defaults.version.dropbear="$VERSION"
|
||||
|
||||
/sbin/uci -q batch << EOF
|
||||
set defaults.version.dropbear="$VERSION"
|
||||
commit defaults
|
||||
set dropbear.@dropbear[0].PasswordAuth='off'
|
||||
set dropbear.@dropbear[0].RootPasswordAuth='off'
|
||||
commit dropbear
|
||||
EOF
|
||||
|
||||
/sbin/service dropbear enable
|
||||
/sbin/service dropbear restart
|
|
@ -1,2 +0,0 @@
|
|||
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
|
||||
/sbin/service sshd restart
|
Loading…
Reference in New Issue