forked from obel1x/fedora-OEMDRV
25 lines
568 B
Bash
Executable File
25 lines
568 B
Bash
Executable File
#!/bin/sh
|
|
# Replaces /etc/skel with the contents of skel.tar.zst
|
|
source $(dirname "$0")/setup_system.inc.sh
|
|
EXECDIR=$(pwd)
|
|
SRCFILE="${SYSCONFIGPATH}/system_setup/skel.tar.zst"
|
|
|
|
#Check for root
|
|
if [ "$EUID" -ne 0 ]; then
|
|
echo "Error: Script requires root privileges."
|
|
exit 1
|
|
fi
|
|
|
|
cd /etc
|
|
sudo rm -f -r /etc/skel
|
|
sudo tar -xf ${SRCFILE}
|
|
if [ $? -eq 0 ]; then
|
|
echo "Sucessfully wrote skel new"
|
|
sudo chown -R root:root /etc/skel
|
|
sudo setfacl -R -m u::rwX,g::rX,o::rX /etc/skel
|
|
else
|
|
echo "Something went wrong, please check Output"
|
|
fi
|
|
cd ${EXECDIR}
|
|
|