Browse Source

update

master
crims0n 5 years ago
parent
commit
36f87b79ee
  1. 91
      linux-live/minioslib
  2. 7
      linux-live/rootcopy-casper/etc/ssh/sshd_config
  3. 5
      linux-live/rootcopy-livekit/etc/ssh/sshd_config

91
linux-live/minioslib

@ -1278,10 +1278,19 @@ function chroot_pkg_install() {
other_pkg_list
# remove unused
$APT_CMD autoremove $APT_OPTIONS >>$OUTPUT 2>&1
# clean up apt cache
$APT_CMD clean $APT_OPTIONS >>$OUTPUT 2>&1
}
function chroot_configure() {
current_process
if [ $LIVE_TYPE = "livekit" ]; then
(cd /linux-live/rootcopy-livekit && cp --parents -afr * /)
elif [ $LIVE_TYPE = "casper" ]; then
#echo ""
(cd /linux-live/rootcopy-casper && cp --parents -afr * /)
fi
@ -1352,6 +1361,28 @@ EOF
echo "resolvconf resolvconf/linkify-resolvconf boolean true" | debconf-set-selections
dpkg-reconfigure resolvconf >>$OUTPUT 2>&1
fi
if [ $LIVE_TYPE = "livekit" ]; then
if grep openssh-server $SCRIPT_DIR/pkglists/main.list >>$OUTPUT 2>&1 || grep openssh-server $SCRIPT_DIR/pkglists/other.list >>$OUTPUT 2>&1; then
echo "Enable ssh.service autostart." >>$OUTPUT 2>&1
cat <<EOF >/lib/systemd/system/ssh-keygen.service
[Unit]
Description=Generate sshd keys
Before=ssh.service
[Service]
Type=oneshot
ExecStart=/usr/bin/ssh-keygen -A
RemainAfterExit=true
StandardOutput=journal
[Install]
WantedBy=multi-user.target
EOF
dpkg-reconfigure -f noninteractive openssh-server >>$OUTPUT 2>&1
fi
fi
if [ $LIVE_TYPE = "casper" ]; then
# network manager
cat <<EOF >/etc/NetworkManager/NetworkManager.conf
@ -1362,7 +1393,7 @@ dns=dnsmasq
[ifupdown]
managed=false
EOF
dpkg-reconfigure network-manager >>$OUTPUT 2>&1
dpkg-reconfigure -f noninteractive network-manager >>$OUTPUT 2>&1
fi
elif [ $DEBIAN_FRONTEND_TYPE = "dialog" ]; then
@ -1378,6 +1409,28 @@ EOF
if grep resolvconf $SCRIPT_DIR/pkglists/main.list >>$OUTPUT 2>&1 || grep resolvconf $SCRIPT_DIR/pkglists/other.list || [ $DISTRIBUTION != "xenial" ] >>$OUTPUT 2>&1; then
dpkg-reconfigure resolvconf
fi
if [ $LIVE_TYPE = "livekit" ]; then
if grep openssh-server $SCRIPT_DIR/pkglists/main.list >>$OUTPUT 2>&1 || grep openssh-server $SCRIPT_DIR/pkglists/other.list >>$OUTPUT 2>&1; then
echo "Enable ssh.service autostart." >>$OUTPUT 2>&1
cat <<EOF >/lib/systemd/system/ssh-keygen.service
[Unit]
Description=Generate sshd keys
Before=ssh.service
[Service]
Type=oneshot
ExecStart=/usr/bin/ssh-keygen -A
RemainAfterExit=true
StandardOutput=journal
[Install]
WantedBy=multi-user.target
EOF
dpkg-reconfigure openssh-server >>$OUTPUT 2>&1
fi
fi
if [ $LIVE_TYPE = "casper" ]; then
# network manager
cat <<EOF >/etc/NetworkManager/NetworkManager.conf
@ -1388,20 +1441,10 @@ dns=dnsmasq
[ifupdown]
managed=false
EOF
dpkg-reconfigure network-manager
dpkg-reconfigure network-manager >>$OUTPUT 2>&1
fi
fi
# remove unused
$APT_CMD autoremove $APT_OPTIONS >>$OUTPUT 2>&1
# clean up apt cache
$APT_CMD clean $APT_OPTIONS >>$OUTPUT 2>&1
}
function chroot_configure() {
current_process
if [ $LIVE_TYPE = "casper" ]; then
update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/minios-logo/minios-logo.plymouth 200
update-alternatives --install /usr/share/plymouth/themes/text.plymouth text.plymouth /usr/share/plymouth/themes/minios-text/minios-text.plymouth 200
@ -1421,26 +1464,8 @@ function chroot_configure() {
ln -s /usr/share/backgrounds/MiniOS.png /usr/share/xfce4/backdrops/xubuntu-wallpaper.png
fi
if grep openssh-server $SCRIPT_DIR/pkglists/main.list >>$OUTPUT 2>&1 || grep openssh-server $SCRIPT_DIR/pkglists/other.list >>$OUTPUT 2>&1; then
echo "Enable ssh.service autostart." >>$OUTPUT 2>&1
cat <<EOF >/lib/systemd/system/ssh-keygen.service
[Unit]
Description=Generate sshd keys
Before=ssh.service
[Service]
Type=oneshot
ExecStart=/usr/bin/ssh-keygen -A
RemainAfterExit=true
StandardOutput=journal
[Install]
WantedBy=multi-user.target
EOF
systemctl enable ssh-keygen >>$OUTPUT 2>&1
systemctl enable ssh >>$OUTPUT 2>&1
fi
systemctl enable ssh-keygen >>$OUTPUT 2>&1
systemctl enable ssh >>$OUTPUT 2>&1
}
function chroot_finish_up() {

7
linux-live/rootcopy-casper/etc/ssh/sshd_config

@ -1,4 +1,4 @@
# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
@ -10,6 +10,8 @@
# possible, but leave them commented. Uncommented options override the
# default value.
Include /etc/ssh/sshd_config.d/*.conf
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
@ -93,7 +95,6 @@ X11Forwarding yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
@ -120,5 +121,3 @@ Subsystem sftp /usr/lib/openssh/sftp-server
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
AllowGroups admin

5
linux-live/rootcopy-livekit/etc/ssh/sshd_config

@ -1,4 +1,4 @@
# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
@ -10,6 +10,8 @@
# possible, but leave them commented. Uncommented options override the
# default value.
Include /etc/ssh/sshd_config.d/*.conf
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
@ -93,7 +95,6 @@ X11Forwarding yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0

Loading…
Cancel
Save