1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#!/bin/bash
### BEGIN SUBROUTINE INFO
# Provides-Var:
# Requires-Var: $FAI_CONFIG_SRC
# Suggests-Var:
# Short-Description: get $FAI by local path
### END SUBROUTINE INFO
# detect local config space
# check if /media/data direcort contain a config space
# otherwise try default path
localpath=/media/data/config
if [ -d $localpath ]; then
echo "Config space detected in $localpath."
mount --bind $localpath $FAI
elif [ -d /var/lib/fai/config ]; then
echo "Using default config space in /var/lib/fai/config"
else
echo "ERROR: No config space deteced."
fi
|