Add 10.2 - Add /etc/fstab

This commit is contained in:
Aditya 2023-01-14 22:00:50 +05:30
parent 6bbab4d6bb
commit 4c2c225324
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#!/bin/bash
cat > /etc/fstab << "EOF"
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/<xxx> / <fff> defaults 1 1
/dev/<yyy> swap swap pri=1 0 0
proc /proc proc nosuid,noexec,nodev 0 0
sysfs /sys sysfs nosuid,noexec,nodev 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
# End /etc/fstab
EOF

View file

@ -1547,3 +1547,16 @@ then
stop_script "chapter9/9.9-shells.sh"
fi
# Chapter 10.2
# ============
echo "Chapter 10"
echo "Creating /etc/fstab"
su -c "bash $SCRIPT/chapter10/10.2-fstab.sh"
# Exit on error
check_exit_code
if [ $exit_status -ne 0 ]
then
stop_script "chapter10/10.2-fstab.sh"
fi