Add 7.5 - create directories

This commit is contained in:
Aditya 2023-01-10 10:18:20 +05:30
parent 1b4481df6f
commit fc1ef6f13c
2 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,22 @@
#!/bin/bash
mkdir -pv /{boot,home,mnt,opt,srv}
mkdir -pv /etc/{opt,sysconfig}
mkdir -pv /lib/firmware
mkdir -pv /media/{floppy,cdrom}
mkdir -pv /usr/{,local/}{include,src}
mkdir -pv /usr/local/{bin,lib,sbin}
mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man}
mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo}
mkdir -pv /usr/{,local/}share/man/man{1..8}
mkdir -pv /var/{cache,local,log,mail,opt,spool}
mkdir -pv /var/lib/{color,misc,locate}
ln -sfv /run /var/run
ln -sfv /run/lock /var/lock
install -dv -m 0750 /root
install -dv -m 1777 /tmp /var/tmp

View file

@ -432,3 +432,15 @@ then
stop_script "chapter7/7.4-enter-chroot.sh"
fi
# Chapter 7.5
# ===========
echo "Creating Directories"
su -c "bash $PWD/chapter7/7.5-create-dirs.sh"
# Exit on error
check_exit_code
if [ $exit_status -ne 0 ]
then
stop_script "chapter7/7.5-create-dirs.sh"
fi