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."
|
||||
#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
|
||||
|
||||
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
|
||||
wget -O zoom.deb https://zoom.us/client/latest/zoom_amd64.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
|
||||
chmod +x gnome-shell-extension-installer
|
||||
doasuser './gnome-shell-extension-installer 307' #dash-to-dock
|
||||
doasuser './gnome-shell-extension-installer 118' #no top left hot corner
|
||||
|
||||
echo "Configuring desktop."
|
||||
#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 preferred-monitor 0'
|
||||
|
||||
doasuser 'gsettings set org.gnome.shell enabled-extensions '"'"'["dash-to-dock@micxgx.gmail.com", "nohotcorner@azuri.free.fr"]'"'"''
|
||||
|
||||
#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
|
||||
doasuser 'gsettings set org.gnome.desktop.wm.preferences button-layout "appbar:minimize,maximize,close"'
|
||||
|
||||
echo "Cleaning up."
|
||||
rm zoom.deb gnome-shell-extension-installer
|
||||
rm chrome.deb zoom.deb gnome-shell-extension-installer
|
||||
|
||||
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
|
||||
/usr/sbin/usermod -a -G sudo ansible
|
||||
|
||||
#Masking sleep targets
|
||||
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
|
||||
|
||||
#update hostnames
|
||||
OLDHOSTNAME=$(cat /etc/hostname)
|
||||
echo -n "Enter new hostname for system: "
|
||||
@ -61,6 +59,12 @@ read NEWHOSTNAME
|
||||
echo $NEWHOSTNAME > /etc/hostname
|
||||
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..."
|
||||
systemctl reboot
|
||||
|
31
input.cfg
31
input.cfg
@ -1,3 +1,4 @@
|
||||
#### Contents of the preconfiguration file (for buster)
|
||||
### Localization
|
||||
# Preseeding only locale sets language, country and locale.
|
||||
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
|
||||
|
||||
### Wifi settings
|
||||
#d-i netcfg/wireless_essid CLC-Guest
|
||||
#d-i netcfg/wireless_security_type wpa
|
||||
#d-i netcfg/wireless_wpa OneChurch!
|
||||
d-i netcfg/wireless_essid CLC-Guest
|
||||
d-i netcfg/wireless_security_type wpa
|
||||
d-i netcfg/wireless_wpa OneChurch!
|
||||
|
||||
### Mirror settings
|
||||
# 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
|
||||
#Tell disk to use lvm and bypasss confirmations to clear previous lvm, raid.
|
||||
d-i partman-auto/method string lvm
|
||||
d-i partman-auto-lvm/guided_size string max
|
||||
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_nooverwrite boolean true
|
||||
|
||||
#Default partition map all files in one partition
|
||||
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/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
|
||||
#Force UEFI
|
||||
d-i partman-efi/non_efi_system boolean false
|
||||
d-i partman-md/confirm boolean true
|
||||
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
|
||||
|
||||
@ -93,19 +96,16 @@ d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
|
||||
### Package selection
|
||||
#tasksel tasksel/first multiselect standard, gnome
|
||||
#tasksel tasksel/first multiselect standard, web-server, kde-desktop
|
||||
|
||||
# Individual additional packages to install
|
||||
#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.
|
||||
# Allowed values: none, safe-upgrade, full-upgrade
|
||||
#d-i pkgsel/upgrade select none
|
||||
|
||||
#Skip popularity contest
|
||||
popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
### Boot loader installation
|
||||
# This is fairly safe to set, it makes grub install automatically to the MBR
|
||||
# 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:
|
||||
#d-i grub-installer/bootdev string /dev/sda
|
||||
# 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
|
||||
# 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.
|
||||
d-i finish-install/reboot_in_progress note
|
||||
|
||||
#eject install cd
|
||||
d-i cdrom-detect/eject boolean false
|
||||
|
||||
#### Advanced options
|
||||
### 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
|
||||
#rename to .passwd.cfg and add a crypt(3) hash password
|
||||
roothash=notarealpassword
|
||||
userhash=12345
|
||||
rootpassword=notarealpassword
|
||||
userpasswort=12345
|
@ -7,9 +7,7 @@ fi
|
||||
|
||||
LOCALIP=$(hostname -I)
|
||||
|
||||
source .passwd.cfg
|
||||
|
||||
[ -d "webdir" ] && echo "Old config found. Removing." && rm -r webdir
|
||||
. .passwd.cfg
|
||||
|
||||
#copy the pre-preseed file and update the passwords from the .passwd.cfg file
|
||||
mkdir webdir
|
||||
|
Loading…
Reference in New Issue
Block a user