diff options
author | Andrew Cady <d@jerkface.net> | 2019-10-04 21:31:14 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2019-10-04 21:31:14 -0400 |
commit | cd7c26906b75f778810a3b83f6508ae0f4c4c3c4 (patch) | |
tree | 7010d0f42a8e1ff10f55c13df18985769ebbf5fe /src/initrd | |
parent | 2c6dc058a0378d5270d4abaa6564ec7ab9fdc8dc (diff) |
create /home/u with btrfs subvolumes preinstalled
Diffstat (limited to 'src/initrd')
-rw-r--r-- | src/initrd/btrfs-create.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/initrd/btrfs-create.sh b/src/initrd/btrfs-create.sh index 26fa263..6752ec8 100644 --- a/src/initrd/btrfs-create.sh +++ b/src/initrd/btrfs-create.sh | |||
@@ -148,9 +148,14 @@ make_subvolume_idem() | |||
148 | 148 | ||
149 | initialize_root_filesystem() | 149 | initialize_root_filesystem() |
150 | { | 150 | { |
151 | for d in /root/root /root/srv /root/var/cache/apt/archives /root/home; do | 151 | local uhome=/home/u |
152 | make_subvolume_idem "$d" | 152 | local uhome_subs="${uhome} ${uhome}/.cache ${uhome}/.stack ${uhome}/.rustup |
153 | ${uhome}/src/fsmgr/_build ${uhome}/Downloads ${uhome}/.mozilla" | ||
154 | for d in /root /srv /var/cache/apt/archives /home $uhome_subs | ||
155 | do | ||
156 | make_subvolume_idem /root/${d} | ||
153 | done | 157 | done |
158 | chroot /root chown -R u:u ${uhome} | ||
154 | 159 | ||
155 | mv /root/root/.gnupg /root/root/.gnupg~ | 160 | mv /root/root/.gnupg /root/root/.gnupg~ |
156 | mv /gpg/gnupghome /root/root/.gnupg || return | 161 | mv /gpg/gnupghome /root/root/.gnupg || return |