lfs-buildscripts/00-SYSTEMPREP.sh
YellowJacketLinux 7cbbce6b75 minor fixes
2024-10-13 15:32:55 -07:00

30 lines
437 B
Bash

#!/bin/bash
LFS=/mnt/newlfs
function myfail {
echo "$1"
exit 1
}
if [ "`whoami`" != "root" ]; then
myfail "Must run this script as r00t"
fi
mkdir -p ${LFS}/{etc,var} ${LFS}/usr/{bin,lib,sbin}
for i in bin lib sbin; do
ln -s usr/$i ${LFS}/$i
done
mkdir -p ${LFS}/lib64
mkdir -p ${LFS}/tools
chown lfs ${LFS}/{usr{,/*},lib,var,etc,bin,sbin,tools}
chown lfs ${LFS}/lib64
mkdir -p ${LFS}/sources
chown lfs ${LFS}/sources