-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
IMAGE_MB=512 | ||
MIRROR=http://mirrors.kernel.org/debian | ||
SYSTEM=debian | ||
ARCH=armhf | ||
SUITE=stretch | ||
|
||
read -r -d '' EXTRA_PACKAGES << EOF | ||
crda | ||
dnsutils | ||
dosfstools | ||
ifupdown | ||
iputils-ping | ||
isc-dhcp-client | ||
kmod | ||
less | ||
locales | ||
net-tools | ||
openssh-client | ||
openssh-server | ||
parted | ||
rfkill | ||
systemd | ||
systemd-sysv | ||
udev | ||
vim-tiny | ||
wireless-tools | ||
wpasupplicant | ||
EOF | ||
|
||
HOSTNAME=nanopi_duo | ||
LOCALE=en_US.UTF-8 | ||
|
||
post_install() { | ||
find "${ROOTFS}/usr/share/doc" ! -name copyright -type f -delete | ||
find "${ROOTFS}/usr/share/doc" -type d -delete > /dev/null 2>&1 | ||
rm -rf "${ROOTFS}/usr/share/man/"* | ||
rm -rf "${ROOTFS}/usr/share/info/"* | ||
rm -rf "${ROOTFS}/usr/share/lintian/"* | ||
|
||
cat >> "${ROOTFS}/etc/securetty" << EOF | ||
ttys0 | ||
EOF | ||
|
||
cp -r "${DIBS}/targets/nanopi_duo_overlay/"* "${ROOTFS}" | ||
sed -i "s/#PermitEmptyPasswords no/PermitEmptyPasswords yes/g" ${ROOTFS}/etc/ssh/sshd_config | ||
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" ${ROOTFS}/etc/ssh/sshd_config | ||
sed -i "s/UsePAM yes/UsePAM no/g" ${ROOTFS}/etc/ssh/sshd_config | ||
run_target /usr/sbin/update-rc.d firstboot defaults | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Dir::Cache { | ||
srcpkgcache ""; | ||
pkgcache ""; | ||
} |
13 changes: 13 additions & 0 deletions
13
targets/nanopi_duo_overlay/etc/dpkg/dpkg.cfg.d/01_smalldisk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# block documentation | ||
path-exclude /usr/share/doc/* | ||
# keep copyright files for legal reasons | ||
path-include /usr/share/doc/*/copyright | ||
path-exclude /usr/share/man/* | ||
path-exclude /usr/share/groff/* | ||
path-exclude /usr/share/info/* | ||
# lintian stuff is small, but really unnecessary | ||
path-exclude /usr/share/lintian/* | ||
path-exclude /usr/share/linda/* | ||
# block non-us locales | ||
path-exclude /usr/share/locale/* | ||
path-include /usr/share/locale/en* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
### BEGIN INIT INFO | ||
# Provides: firstboot | ||
# Required-Start: $remote_fs $syslog | ||
# Required-Stop: | ||
# X-Start-Before: sshd | ||
# Default-Start: S | ||
# Default-Stop: | ||
# Short-Description: First boot configuration. | ||
### END INIT INFO | ||
|
||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | ||
|
||
test "$1" = "start" || exit 0 | ||
|
||
#test -f /boot/firstboot.txt && . /boot/firstboot.txt | ||
|
||
/usr/bin/ssh-keygen -A | ||
update-rc.d firstboot disable | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
auto eth0 | ||
allow-hotplug eth0 | ||
iface eth0 inet dhcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
auto wlan0 | ||
allow-hotplug wlan0 | ||
iface wlan0 inet dhcp | ||
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf |
1 change: 1 addition & 0 deletions
1
targets/nanopi_duo_overlay/etc/wpa_supplicant/wpa_supplicant.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
country=US |