mirror of
https://github.com/tommytran732/Arch-Setup-Script
synced 2024-11-09 04:01:33 -05:00
Compare commits
2 Commits
e7dba4febf
...
4b7a2682bd
Author | SHA1 | Date | |
---|---|---|---|
4b7a2682bd | |||
a5e2f37b75 |
10
install.sh
10
install.sh
@ -22,6 +22,8 @@ unpriv(){
|
|||||||
sudo -u nobody "$@"
|
sudo -u nobody "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
installation_date=$(date "+%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
# Check if this is a VM
|
# Check if this is a VM
|
||||||
virtualization=$(systemd-detect-virt)
|
virtualization=$(systemd-detect-virt)
|
||||||
|
|
||||||
@ -266,15 +268,14 @@ fi
|
|||||||
## Set the default BTRFS Subvol to Snapshot 1 before pacstrapping
|
## Set the default BTRFS Subvol to Snapshot 1 before pacstrapping
|
||||||
btrfs subvolume set-default "$(btrfs subvolume list /mnt | grep "@/.snapshots/1/snapshot" | grep -oP '(?<=ID )[0-9]+')" /mnt
|
btrfs subvolume set-default "$(btrfs subvolume list /mnt | grep "@/.snapshots/1/snapshot" | grep -oP '(?<=ID )[0-9]+')" /mnt
|
||||||
|
|
||||||
## Temporarily hardcode the date here, will make it work with proper date later.
|
echo "<?xml version=\"1.0\"?>
|
||||||
echo '<?xml version="1.0"?>
|
|
||||||
<snapshot>
|
<snapshot>
|
||||||
<type>single</type>
|
<type>single</type>
|
||||||
<num>1</num>
|
<num>1</num>
|
||||||
<date>1999-03-31 0:00:00</date>
|
<date>${installation_date}</date>
|
||||||
<description>First Root Filesystem</description>
|
<description>First Root Filesystem</description>
|
||||||
<cleanup>number</cleanup>
|
<cleanup>number</cleanup>
|
||||||
</snapshot>' > /mnt/@/.snapshots/1/info.xml
|
</snapshot>" > /mnt/@/.snapshots/1/info.xml
|
||||||
|
|
||||||
chmod 600 /mnt/@/.snapshots/1/info.xml
|
chmod 600 /mnt/@/.snapshots/1/info.xml
|
||||||
|
|
||||||
@ -595,7 +596,6 @@ fi
|
|||||||
## Set umask to 077.
|
## Set umask to 077.
|
||||||
sed -i 's/^UMASK.*/UMASK 077/g' /mnt/etc/login.defs
|
sed -i 's/^UMASK.*/UMASK 077/g' /mnt/etc/login.defs
|
||||||
sed -i 's/^HOME_MODE/#HOME_MODE/g' /mnt/etc/login.defs
|
sed -i 's/^HOME_MODE/#HOME_MODE/g' /mnt/etc/login.defs
|
||||||
sed -i 's/^USERGROUPS_ENAB.*/USERGROUPS_ENAB no/g' /mnt/etc/login.defs
|
|
||||||
sed -i 's/umask 022/umask 077/g' /mnt/etc/bash.bashrc
|
sed -i 's/umask 022/umask 077/g' /mnt/etc/bash.bashrc
|
||||||
|
|
||||||
# Finish up
|
# Finish up
|
||||||
|
Loading…
Reference in New Issue
Block a user