Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam 101-500 topic 1 question 120 discussion

Actual exam question from LPI's 101-500
Question #: 120
Topic #: 1
[All 101-500 Questions]

Given the following two symbolic links in a System V init configuration:
/etc/rc1.d/K01apache2
/etc/rc2.d/S02apache2
When are the scripts executed that are referenced by these links? (Choose two.)

  • A. S02apache2 is run when runlevel 2 is entered.
  • B. S02apache2 is run when runlevel 2 is left.
  • C. K01apache2 is never run because K indicates a deactivated service.
  • D. Both S02apache2 and K01apache2 are run during a system shutdown.
  • E. K01apache2 is run when runlevel 1 is entered.
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Chenar
Highly Voted 3 years, 2 months ago
The Correct Answer is : A and E
upvoted 7 times
...
glorofarz
Highly Voted 3 years, 8 months ago
this does not seem right to me, this does: AE
upvoted 5 times
Zeist
3 years, 8 months ago
I agree, AE is the correct answer in my opinon
upvoted 5 times
...
...
jurgen1
Most Recent 1 year ago
Selected Answer: AC
A. S02apache2 is run when runlevel 2 is entered. This is because the symbolic link in /etc/rc2.d starts with the letter "S", which stands for "Start", and is followed by a number that determines the order in which the scripts are executed when entering the corresponding runlevel. C. K01apache2 is never run because K indicates a deactivated service. This is because the symbolic link in /etc/rc1.d starts with the letter "K", which stands for "Kill", and is followed by a number that determines the order in which the scripts are executed when leaving the corresponding runlevel. Therefore, the correct answers are A and C.
upvoted 4 times
...
blk_542
1 year, 4 months ago
Selected Answer: AE
AE: Regarding the E, we all agree that K indicates that THE SERVICE (apache2) won't take place in run level 1. But the question (and is somewhat ambiguous wording) ask about THE SCRIPT itself that will deactivate apache2. By following the logic of https://www.golinuxhub.com/2014/01/what-are-s-and-k-scripts-in-etc-rcxd/, the K scripts are in deed executed to stop the service. So, if the option C didn't include the K01 and just refer to the apache2 service that would be correct. But again, the reasoning of the question refers to the script itself, or at least that is the way it is written.
upvoted 3 times
...
gonzaloco
1 year, 11 months ago
Selected Answer: AE
I think the answer is A and E.
upvoted 3 times
...
serlan
2 years, 3 months ago
Selected Answer: AE
A and E
upvoted 2 times
...
anhcq
2 years, 4 months ago
Selected Answer: AE
The first letter of the link filename in the runlevel’s directory indicates if the service should be started or terminated for the corresponding runlevel. A link’s filename starting with letter K determines that the service will be killed when entering the runlevel (kill). Ref: https://learning.lpi.org/en/learning-materials/101-500/101/101.3/101.3_01/
upvoted 4 times
...
ChrisGrande
2 years, 6 months ago
question is When are the scripts executed. So A and E is an answer to the question. C is not the explicit answer to the question.
upvoted 4 times
...
CuriousLinuxCat
2 years, 8 months ago
Can't say for sure, but what @Zeist said resonates more intuitively for me. I think that K01apache2 script (Answer C) is read by the OS and is promptly killed before the service can be started / has already started. "deactivated service" may not apply because the service could have been started prior to the scripts being executed. I would go for A and E.
upvoted 4 times
...
[Removed]
3 years, 8 months ago
C is correct. The S stands for start and K for Kill. These are essentially links to the original scripts in /etc/rc.d. The numbers after S/K are the priority by which the services will be started/Killed
upvoted 1 times
Zeist
3 years, 8 months ago
Both S and K links gives to OS instructions on how handle a specific service when an init state change happen. K and S indicate if the service will be started or stopped, the following number indicate the init level to which the script will be applied. Any link that start with K01 means that the relative service will be killed as soon as the system switch of init 1 (single user mode). A and E are correct.
upvoted 9 times
ilputto
3 years, 5 months ago
I'm agree , AE are correct
upvoted 2 times
...
daca11
3 years, 3 months ago
I don't agree with you. The number indicates priority of execution, the init state is indicated in the folder containing the scripts. K00 will be executed first and K99 last. On the other hand, for me A is correct. E is wrong, that script will be run when leaving runlevel 1. C might be correct, because runlevel 1 is single-user mode used for system maintenance, and in that state, services are restricted to bare-minimum, and apache might be deactivated in that runlevel.
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...