crims0n 4 years ago
parent
commit
f1cc636be4
  1. 5
      linux-live/basesystem/01-core/rootcopy-install/usr/lib/systemd/system/cmdline-parser.service
  2. 176
      linux-live/minioslib
  3. 0
      modules/06-virtmanager/install
  4. 0
      modules/06-virtmanager/postinstall

5
linux-live/basesystem/01-core/rootcopy-install/usr/lib/systemd/system/cmdline-parser.service

@ -1,6 +1,7 @@
[Unit]
Description=Сommand line parsing script
Before=ssh-keygen.service
Before=basic.target
After=local-fs.target sysinit.target
[Service]
Type=oneshot
@ -9,4 +10,4 @@ RemainAfterExit=true
StandardOutput=journal
[Install]
WantedBy=multi-user.target
WantedBy=basic.target

176
linux-live/minioslib

@ -1516,17 +1516,21 @@ function chroot_configure() {
(cd /linux-live/basesystem/01-core/rootcopy-install && cp --parents -afr * /)
# if [ $CLOUD != "true" ]; then
# echo "Set up password for user 'root'" >>$OUTPUT 2>&1
# echo root:$ROOT_PASSWORD | chpasswd >>$OUTPUT 2>&1
if [ -f /usr/lib/systemd/system/cmdline-parser.service ]; then
echo "Enable cmdline-parser.service autostart." >>$OUTPUT 2>&1
systemctl enable cmdline-parser.service >>$OUTPUT 2>&1
else
if [ $CLOUD != "true" ]; then
echo "Set up password for user 'root'" >>$OUTPUT 2>&1
echo root:$ROOT_PASSWORD | chpasswd >>$OUTPUT 2>&1
# echo "Set up user '$USER_NAME'" >>$OUTPUT 2>&1
# adduser --uid 1000 --gecos '' $USER_NAME --disabled-password >>$OUTPUT 2>&1
# echo "Set up password for user '$USER_NAME'" >>$OUTPUT 2>&1
# echo $USER_NAME:$USER_PASSWORD | chpasswd >>$OUTPUT 2>&1
# usermod -a -G sudo $USER_NAME
echo "Set up user '$USER_NAME'" >>$OUTPUT 2>&1
adduser --uid 1000 --gecos '' $USER_NAME --disabled-password >>$OUTPUT 2>&1
echo "Set up password for user '$USER_NAME'" >>$OUTPUT 2>&1
echo $USER_NAME:$USER_PASSWORD | chpasswd >>$OUTPUT 2>&1
usermod -a -G sudo $USER_NAME
: 'if [ ! -d /home/$USER_NAME ]; then
: 'if [ ! -d /home/$USER_NAME ]; then
mkdir -p /home/$USER_NAME
fi
cp -r /etc/skel/* /home/$USER_NAME
@ -1534,16 +1538,82 @@ function chroot_configure() {
chown $USER_NAME:$USER_NAME /home/$USER_NAME
chown -R $USER_NAME:$USER_NAME /home/$USER_NAME'
# cat <<EOF >/etc/sudoers.d/90-minios
# live user is default user in minios.
# It needs passwordless sudo functionality.
#$USER_NAME ALL=(ALL) NOPASSWD:ALL
#EOF
# else
# echo "Set up password for user 'root'" >>$OUTPUT 2>&1
# echo root:$ROOT_PASSWORD | chpasswd >>$OUTPUT 2>&1
# rm -rf /home/live
# fi
cat <<EOF >/etc/sudoers.d/90-minios
# live user is default user in minios.
# It needs passwordless sudo functionality.
$USER_NAME ALL=(ALL) NOPASSWD:ALL
EOF
cat <<EOF >/etc/issue
\l
Thank you for using MiniOS.
Based on Debian GNU/Linux.
Powered by Slax.
:::: :::: ::::::::::: :::: ::: ::::::::::: :::::::: :::::::: 
+:+:+: :+:+:+ :+: :+:+: :+: :+: :+: :+: :+: :+: 
+:+ +:+:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+ 
+#+ +:+ +#+ +#+ +#+ +:+ +#+ +#+ +#+ +:+ +#++:++#++ 
+#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+ 
#+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+# 
### ### ########### ### #### ########### ######## ######## 
Root login name: root
Password: $ROOT_PASSWORD
User login name: $USER_NAME
Password: $USER_PASSWORD
EOF
else
echo "Set up password for user 'root'" >>$OUTPUT 2>&1
echo root:$ROOT_PASSWORD | chpasswd >>$OUTPUT 2>&1
rm -rf /home/live
cat <<EOF >/etc/issue
\l
Thank you for using MiniOS.
Based on Debian GNU/Linux.
Powered by Slax.
:::: :::: ::::::::::: :::: ::: ::::::::::: :::::::: :::::::: 
+:+:+: :+:+:+ :+: :+:+: :+: :+: :+: :+: :+: :+: 
+:+ +:+:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+ 
+#+ +:+ +#+ +#+ +#+ +:+ +#+ +#+ +#+ +:+ +#++:++#++ 
+#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+ 
#+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+# 
### ### ########### ### #### ########### ######## ######## 
User login name set by
cloud-init. You must use
your ssh key to login.
Root login name: root
Password: $ROOT_PASSWORD
EOF
fi
fi
if [ ! -d /etc/NetworkManager ]; then
echo "Enable dhclient.service autostart." >>$OUTPUT 2>&1
@ -1631,74 +1701,6 @@ fi
echo "Sudo is not installed. Run the command as root or install sudo."
EOF
fi
: ' if [ $CLOUD != "true" ]; then
cat <<EOF >/etc/issue
\l
Thank you for using MiniOS.
Based on Debian GNU/Linux.
Powered by Slax.
:::: :::: ::::::::::: :::: ::: ::::::::::: :::::::: :::::::: 
+:+:+: :+:+:+ :+: :+:+: :+: :+: :+: :+: :+: :+: 
+:+ +:+:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+ 
+#+ +:+ +#+ +#+ +#+ +:+ +#+ +#+ +#+ +:+ +#++:++#++ 
+#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+ 
#+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+# 
### ### ########### ### #### ########### ######## ######## 
Root login name: root
Password: $ROOT_PASSWORD
User login name: $USER_NAME
Password: $USER_PASSWORD
EOF
else
cat <<EOF >/etc/issue
\l
Thank you for using MiniOS.
Based on Debian GNU/Linux.
Powered by Slax.
:::: :::: ::::::::::: :::: ::: ::::::::::: :::::::: :::::::: 
+:+:+: :+:+:+ :+: :+:+: :+: :+: :+: :+: :+: :+: 
+:+ +:+:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+ 
+#+ +:+ +#+ +#+ +#+ +:+ +#+ +#+ +#+ +:+ +#++:++#++ 
+#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+ 
#+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+# 
### ### ########### ### #### ########### ######## ######## 
User login name set by
cloud-init. You must use
your ssh key to login.
Root login name: root
Password: $ROOT_PASSWORD
EOF
fi'
}
# =================================================================

0
linux-live/modules/06-virtmanager/install → modules/06-virtmanager/install

0
linux-live/modules/06-virtmanager/postinstall → modules/06-virtmanager/postinstall

Loading…
Cancel
Save