mirror of
https://github.com/Snigdha-OS/snigdhaos-system-installation.git
synced 2026-03-23 01:18:55 +01:00
57 lines
1.4 KiB
Bash
Executable File
57 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Author : Eshan Roy <eshan@snigdhaos.or>
|
|
# Author URL : https://eshanized.github.io/
|
|
|
|
echo
|
|
echo "--->> Start snigdhaos-final <<---"
|
|
echo
|
|
|
|
# Set permissions
|
|
echo "Permissions..."
|
|
chmod 750 /etc/sudoers.d
|
|
chmod 750 /etc/polkit-1/rules.d
|
|
chown polkitd /etc/polkit-1/rules.d
|
|
|
|
# Copy skeleton files to root
|
|
echo "[Copy] /etc/skel -> /root"
|
|
cp -aT /etc/skel/ /root/
|
|
|
|
# Cleanup autologin
|
|
echo "Cleanup autologin"
|
|
rm -rfv /etc/systemd/system/getty@tty1.service.d
|
|
|
|
# Set editor to nano
|
|
echo "Setting editor -> nano"
|
|
echo "EDITOR=nano" >> /etc/profile
|
|
|
|
# Enhance Bluetooth
|
|
echo "Enhance Bluetooth..."
|
|
sed -i "s/#AutoEnable=false/AutoEnable=true/g" /etc/bluetooth/main.conf
|
|
echo 'load-module module-switch-on-connect' | sudo tee --append /etc/pulse/default.pa
|
|
|
|
# Cleanup original files
|
|
echo "Cleanup original files..."
|
|
rm -fv /etc/sudoers.d/g_wheel
|
|
rm -fv /etc/polkit-1/rules.d/49-nopasswd_global.rules
|
|
rm -v /root/{.automated_script.sh,.zlogin}
|
|
mv -v /etc/snigdhaos-release /etc/lsb-release
|
|
|
|
# Install kernel-install-mkinitcpio if using systemd-boot
|
|
if [ -f /boot/efi/loader/loader.conf ]; then
|
|
echo "Installing kernel-install-mkinitcpio..."
|
|
pacman -U --noconfirm /usr/local/bin/kernel-install-mkinitcpio-*-any.pkg.tar.zst
|
|
fi
|
|
|
|
# Set root permissions
|
|
echo "Root Permission"
|
|
chmod -v 700 /root
|
|
|
|
# Run Snigdha OS Virtual-Machine-Check
|
|
echo "Snigdha OS Virtual-Machine-Check"
|
|
/usr/local/bin/snigdhaos-virtual-machine-check
|
|
|
|
echo
|
|
echo "End!!!"
|
|
echo |