Compare commits
No commits in common. "master" and "debian10" have entirely different histories.
22
firstboot.sh
22
firstboot.sh
@ -11,11 +11,15 @@ doasuser () {
|
|||||||
|
|
||||||
echo "Cleaning up default Gnome Install."
|
echo "Cleaning up default Gnome Install."
|
||||||
#clean up gnome things
|
#clean up gnome things
|
||||||
apt purge -y gnome-games gnome-documents gnome-todo gnome-music gnome-maps rhythmbox totem
|
apt purge -y gnome-games xterm gnome-documents gnome-todo gnome-music gnome-maps rhythmbox totem
|
||||||
apt autoremove -y
|
apt autoremove -y
|
||||||
|
|
||||||
echo "Installing base applications."
|
echo "Installing base applications."
|
||||||
|
|
||||||
|
#install google chrome
|
||||||
|
wget -O chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||||
|
apt install -y ./google-chrome-stable_current_amd64.deb
|
||||||
|
|
||||||
#install zoom
|
#install zoom
|
||||||
wget -O zoom.deb https://zoom.us/client/latest/zoom_amd64.deb
|
wget -O zoom.deb https://zoom.us/client/latest/zoom_amd64.deb
|
||||||
apt install -y ./zoom.deb
|
apt install -y ./zoom.deb
|
||||||
@ -24,7 +28,6 @@ echo "Installing extensions."
|
|||||||
wget https://raw.githubusercontent.com/brunelli/gnome-shell-extension-installer/master/gnome-shell-extension-installer
|
wget https://raw.githubusercontent.com/brunelli/gnome-shell-extension-installer/master/gnome-shell-extension-installer
|
||||||
chmod +x gnome-shell-extension-installer
|
chmod +x gnome-shell-extension-installer
|
||||||
doasuser './gnome-shell-extension-installer 307' #dash-to-dock
|
doasuser './gnome-shell-extension-installer 307' #dash-to-dock
|
||||||
doasuser './gnome-shell-extension-installer 118' #no top left hot corner
|
|
||||||
|
|
||||||
echo "Configuring desktop."
|
echo "Configuring desktop."
|
||||||
#set shell theme and dock
|
#set shell theme and dock
|
||||||
@ -32,16 +35,14 @@ doasuser 'gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"'
|
|||||||
doasuser 'gsettings --schemadir ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/ set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM'
|
doasuser 'gsettings --schemadir ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/ set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM'
|
||||||
doasuser 'gsettings --schemadir ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/ set org.gnome.shell.extensions.dash-to-dock preferred-monitor 0'
|
doasuser 'gsettings --schemadir ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/ set org.gnome.shell.extensions.dash-to-dock preferred-monitor 0'
|
||||||
|
|
||||||
doasuser 'gsettings set org.gnome.shell enabled-extensions '"'"'["dash-to-dock@micxgx.gmail.com", "nohotcorner@azuri.free.fr"]'"'"''
|
|
||||||
|
|
||||||
#configure favorites
|
#configure favorites
|
||||||
doasuser 'gsettings set org.gnome.shell favorite-apps '"'"'["firefox-esr.desktop", "org.gnome.Nautilus.desktop", "vlc.desktop", "Zoom.desktop", "libreoffice-impress.desktop"]'"'"''
|
doasuser 'gsettings set org.gnome.shell favorite-apps '"'"'["firefox-esr.desktop", "google-chrome.desktop", "org.gnome.Nautilus.desktop", "vlc.desktop", "Zoom.desktop", "libreoffice-impress.desktop"]'"'"''
|
||||||
|
|
||||||
#add min and max buttons to title bars
|
#add min and max buttons to title bars
|
||||||
doasuser 'gsettings set org.gnome.desktop.wm.preferences button-layout "appbar:minimize,maximize,close"'
|
doasuser 'gsettings set org.gnome.desktop.wm.preferences button-layout "appbar:minimize,maximize,close"'
|
||||||
|
|
||||||
echo "Cleaning up."
|
echo "Cleaning up."
|
||||||
rm zoom.deb gnome-shell-extension-installer
|
rm chrome.deb zoom.deb gnome-shell-extension-installer
|
||||||
|
|
||||||
echo "Adding user for ansible"
|
echo "Adding user for ansible"
|
||||||
|
|
||||||
@ -51,9 +52,6 @@ apt install openssh-server
|
|||||||
echo -e "ansible\nansible" | passwd ansible #changed later after first ansible login
|
echo -e "ansible\nansible" | passwd ansible #changed later after first ansible login
|
||||||
/usr/sbin/usermod -a -G sudo ansible
|
/usr/sbin/usermod -a -G sudo ansible
|
||||||
|
|
||||||
#Masking sleep targets
|
|
||||||
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
|
|
||||||
|
|
||||||
#update hostnames
|
#update hostnames
|
||||||
OLDHOSTNAME=$(cat /etc/hostname)
|
OLDHOSTNAME=$(cat /etc/hostname)
|
||||||
echo -n "Enter new hostname for system: "
|
echo -n "Enter new hostname for system: "
|
||||||
@ -61,6 +59,12 @@ read NEWHOSTNAME
|
|||||||
echo $NEWHOSTNAME > /etc/hostname
|
echo $NEWHOSTNAME > /etc/hostname
|
||||||
sed -i "s/$OLDHOSTNAME/$NEWHOSTNAME/g" /etc/hosts
|
sed -i "s/$OLDHOSTNAME/$NEWHOSTNAME/g" /etc/hosts
|
||||||
|
|
||||||
|
#updating to backports kernel
|
||||||
|
echo "deb http://deb.debian.org/debian buster-backports main" | tee -a /etc/apt/sources.list
|
||||||
|
|
||||||
|
echo "Updating to backports kernel."
|
||||||
|
apt update
|
||||||
|
apt -t buster-backports upgrade -y
|
||||||
|
|
||||||
echo "Rebooting..."
|
echo "Rebooting..."
|
||||||
systemctl reboot
|
systemctl reboot
|
||||||
|
31
input.cfg
31
input.cfg
@ -1,3 +1,4 @@
|
|||||||
|
#### Contents of the preconfiguration file (for buster)
|
||||||
### Localization
|
### Localization
|
||||||
# Preseeding only locale sets language, country and locale.
|
# Preseeding only locale sets language, country and locale.
|
||||||
d-i debian-installer/locale string en_US
|
d-i debian-installer/locale string en_US
|
||||||
@ -30,9 +31,9 @@ d-i netcfg/wireless_wep string
|
|||||||
d-i hw-detect/load_firmware boolean true
|
d-i hw-detect/load_firmware boolean true
|
||||||
|
|
||||||
### Wifi settings
|
### Wifi settings
|
||||||
#d-i netcfg/wireless_essid CLC-Guest
|
d-i netcfg/wireless_essid CLC-Guest
|
||||||
#d-i netcfg/wireless_security_type wpa
|
d-i netcfg/wireless_security_type wpa
|
||||||
#d-i netcfg/wireless_wpa OneChurch!
|
d-i netcfg/wireless_wpa OneChurch!
|
||||||
|
|
||||||
### Mirror settings
|
### Mirror settings
|
||||||
# If you select ftp, the mirror/country string does not need to be set.
|
# If you select ftp, the mirror/country string does not need to be set.
|
||||||
@ -65,7 +66,6 @@ d-i clock-setup/ntp boolean true
|
|||||||
|
|
||||||
|
|
||||||
### Partitioning
|
### Partitioning
|
||||||
#Tell disk to use lvm and bypasss confirmations to clear previous lvm, raid.
|
|
||||||
d-i partman-auto/method string lvm
|
d-i partman-auto/method string lvm
|
||||||
d-i partman-auto-lvm/guided_size string max
|
d-i partman-auto-lvm/guided_size string max
|
||||||
d-i partman-lvm/device_remove_lvm boolean true
|
d-i partman-lvm/device_remove_lvm boolean true
|
||||||
@ -73,17 +73,20 @@ d-i partman-md/device_remove_md boolean true
|
|||||||
d-i partman-lvm/confirm boolean true
|
d-i partman-lvm/confirm boolean true
|
||||||
d-i partman-lvm/confirm_nooverwrite boolean true
|
d-i partman-lvm/confirm_nooverwrite boolean true
|
||||||
|
|
||||||
#Default partition map all files in one partition
|
|
||||||
d-i partman-auto/choose_recipe select atomic
|
d-i partman-auto/choose_recipe select atomic
|
||||||
|
|
||||||
#Tell partman to go without confirmation
|
|
||||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||||
d-i partman/choose_partition select finish
|
d-i partman/choose_partition select finish
|
||||||
d-i partman/confirm boolean true
|
d-i partman/confirm boolean true
|
||||||
d-i partman/confirm_nooverwrite boolean true
|
d-i partman/confirm_nooverwrite boolean true
|
||||||
|
|
||||||
#Force UEFI
|
d-i partman-md/confirm boolean true
|
||||||
d-i partman-efi/non_efi_system boolean false
|
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||||
|
d-i partman/choose_partition select finish
|
||||||
|
d-i partman/confirm boolean true
|
||||||
|
d-i partman/confirm_nooverwrite boolean true
|
||||||
|
|
||||||
|
d-i partman-efi/non_efi_system boolean true
|
||||||
|
|
||||||
### Base system installation
|
### Base system installation
|
||||||
|
|
||||||
@ -93,19 +96,16 @@ d-i apt-setup/non-free boolean true
|
|||||||
d-i apt-setup/contrib boolean true
|
d-i apt-setup/contrib boolean true
|
||||||
|
|
||||||
### Package selection
|
### Package selection
|
||||||
#tasksel tasksel/first multiselect standard, gnome
|
#tasksel tasksel/first multiselect standard, web-server, kde-desktop
|
||||||
|
|
||||||
# Individual additional packages to install
|
# Individual additional packages to install
|
||||||
#d-i pkgsel/include string openssh-server build-essential
|
#d-i pkgsel/include string openssh-server build-essential
|
||||||
d-i pkgsel/include string firmware-iwlwifi openssh-server curl vlc timeshift
|
d-i pkgsel/include string firmware-iwlwifi openssh-server curl vlc
|
||||||
|
|
||||||
# Whether to upgrade packages after debootstrap.
|
# Whether to upgrade packages after debootstrap.
|
||||||
# Allowed values: none, safe-upgrade, full-upgrade
|
# Allowed values: none, safe-upgrade, full-upgrade
|
||||||
#d-i pkgsel/upgrade select none
|
#d-i pkgsel/upgrade select none
|
||||||
|
|
||||||
#Skip popularity contest
|
|
||||||
popularity-contest popularity-contest/participate boolean false
|
|
||||||
|
|
||||||
### Boot loader installation
|
### Boot loader installation
|
||||||
# This is fairly safe to set, it makes grub install automatically to the MBR
|
# This is fairly safe to set, it makes grub install automatically to the MBR
|
||||||
# if no other operating system is detected on the machine.
|
# if no other operating system is detected on the machine.
|
||||||
@ -119,7 +119,7 @@ d-i grub-installer/with_other_os boolean true
|
|||||||
# determined safely in general, so this needs to be specified:
|
# determined safely in general, so this needs to be specified:
|
||||||
#d-i grub-installer/bootdev string /dev/sda
|
#d-i grub-installer/bootdev string /dev/sda
|
||||||
# To install to the first device (assuming it is not a USB stick):
|
# To install to the first device (assuming it is not a USB stick):
|
||||||
d-i grub-installer/bootdev string default
|
#d-i grub-installer/bootdev string default
|
||||||
|
|
||||||
# Use the following option to add additional boot parameters for the
|
# Use the following option to add additional boot parameters for the
|
||||||
# installed system (if supported by the bootloader installer).
|
# installed system (if supported by the bootloader installer).
|
||||||
@ -131,9 +131,6 @@ d-i grub-installer/bootdev string default
|
|||||||
# Avoid that last message about the install being complete.
|
# Avoid that last message about the install being complete.
|
||||||
d-i finish-install/reboot_in_progress note
|
d-i finish-install/reboot_in_progress note
|
||||||
|
|
||||||
#eject install cd
|
|
||||||
d-i cdrom-detect/eject boolean false
|
|
||||||
|
|
||||||
#### Advanced options
|
#### Advanced options
|
||||||
### Running custom commands during the installation
|
### Running custom commands during the installation
|
||||||
|
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
CMD=$1
|
|
||||||
|
|
||||||
if ! command -v parallel-ssh &> /dev/null
|
|
||||||
then
|
|
||||||
echo "parallel-ssh could not be found. Attempting to aquire from the repo."
|
|
||||||
sudo apt install pssh
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "You are about to run \e[1;32m$CMD\e[0m on all hosts."
|
|
||||||
|
|
||||||
run () {
|
|
||||||
if grep -q "sudo" <<< "$CMD"; then
|
|
||||||
echo "sudo command detected. Attempting to elevate permissions"
|
|
||||||
echo "Please enter your sudo password."
|
|
||||||
read -s SUDOPASS
|
|
||||||
parallel-ssh -A -i -x '-tt' -t 0 -h pssh_hosts -l ansible "echo '$SUDOPASS' | $CMD && history -c"
|
|
||||||
else
|
|
||||||
parallel-ssh -A -i -x '-tt' -h pssh_hosts -l ansible "$CMD && history -c"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
read -p "Are you sure? (y/n): " yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]* ) run; break;;
|
|
||||||
[Nn]* ) exit;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
@ -1,8 +0,0 @@
|
|||||||
w150-debian.local
|
|
||||||
center6-debian.local
|
|
||||||
library-debian.local
|
|
||||||
lacky-debian.local
|
|
||||||
foruma-debian.local
|
|
||||||
forumb-debian.local
|
|
||||||
forumc-debian.local
|
|
||||||
musicroom-debian.local
|
|
@ -1,4 +1,4 @@
|
|||||||
#EXAMPLE PASSWD config file
|
#EXAMPLE PASSWD config file
|
||||||
#rename to .passwd.cfg and add a crypt(3) hash password
|
#rename to .passwd.cfg and add a crypt(3) hash password
|
||||||
roothash=notarealpassword
|
rootpassword=notarealpassword
|
||||||
userhash=12345
|
userpasswort=12345
|
@ -7,9 +7,7 @@ fi
|
|||||||
|
|
||||||
LOCALIP=$(hostname -I)
|
LOCALIP=$(hostname -I)
|
||||||
|
|
||||||
source .passwd.cfg
|
. .passwd.cfg
|
||||||
|
|
||||||
[ -d "webdir" ] && echo "Old config found. Removing." && rm -r webdir
|
|
||||||
|
|
||||||
#copy the pre-preseed file and update the passwords from the .passwd.cfg file
|
#copy the pre-preseed file and update the passwords from the .passwd.cfg file
|
||||||
mkdir webdir
|
mkdir webdir
|
||||||
|
Loading…
Reference in New Issue
Block a user