Fedora16 custom boot script

Source: Internet
Author: User
Fedora16 is not rc. local support. In fact, only rc is deleted. local file. If you want to run your own script at startup, you only need to create a new rc. the local file is ready. Let's test the environment: Fedora16Gnome desktop 1. /etc/rc. local is actually/etc/rc. d/rc. note: rc. #! Must be added to the local header #! /Bin/shecho "echo4 & g

Fedora 16 is not rc. local support. In fact, only rc is deleted. local file. If you want to run your own script at startup, you only need to create a new rc. the local file is enough. Let's test it below:

Environment: Fedora 16 Gnome Desktop

1./etc/rc. local is actually a soft connection of/etc/rc. d/rc. local, so:

Note: The rc. local header must be added #! /Bin/sh

Echo "echo 4>/sys/class/backlight/acpi_video0/brightness">/etc/rc. d/rc. local

Chmod + x/etc/rc. d/rc. local

Ln-s/etc/rc. d/rc. local/etc/rc. local

2. View rc-local.service

Systemctl status rc-local.service

If the service is not started, you can start the rc-local.service first

3. Start rc-local.service

Systemctl start rc-local.service

Then run the 2nd Command to check the service status. Some services may not be started here. Why:

Solution:

Edit the file/lib/systemd/system/rc-local.service and change ConditionFilel *** ecutable =/etc/rc. d/rc. reward # comment out and # ConditionFilel *** ecutable =/etc/rc. d/rc. local

Start the rc-local.service again and use the systemctl status rc-local.service to see if the status has started.

4. Restart the machine

The brightness has been adjusted to 4, indicating that our boot script has been run! You can also do other work as long as you need

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.