When running fglam-init-script-installer.sh as root, the following error is generated:
[root@hostname]# ./fglam-init-script-installer.sh install [./fglam-init-script-installer.sh] Error: at least one run level must be selected
PART 1:
Compare the attached updated-fglam-init-script-installer.sh file with the version that you are running. The attached file contains run levels 2,3, and 5. Modify your script to reflect the desired run levels.
There are 2 blocks that needs to be modified:
1. This block contains the condition that run levels have been selected. In this example, 2,3, and 5 run levels were selected - "235". If no run level is selected, the condition will test against a null value "" thereby throwing the error message.
if [ -z "235" ]; then
echo "[$0] Error: at least one run level must be selected"
exit 1
fi
2. This block contains the symbolic links that will be created for the respective run levels. Modify based on the selected run levels.
# These are the runlevel symlinks we need to create
set \
"/etc/rc2.d/S99quest-fglam" \
"/etc/rc2.d/K01quest-fglam" \
"/etc/rc3.d/S99quest-fglam" \
"/etc/rc3.d/K01quest-fglam" \
"" \
"" \
"/etc/rc5.d/S99quest-fglam" \
"/etc/rc5.d/K01quest-fglam"
NOTE: Do not simply copy the entire contents of the attached script as it contains variables that depends on your environment such as FGLAM_HOME, FGLAM_INITD_SCRIPT, and RUN_AS_USER.
PART 2:
Compare the attached updated-fglam-init-script.sh file with the version that you have. The attached file contains run levels 2,3, and 5. Modify your script to reflect the desired run levels.
There are 2 blocks that needs to be modified:
# chkconfig: 235 99 01
# Default-Start: 2 3 5
The 2 lines above needs to reflect the run levels. In this case, the run levels used are 2, 3, 5.
NOTE: Do not simply copy the entire contents of the attached script as it contains variables that depends on your environment