|
|
@ -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() { |
|
|
|