Fixed issue: The boot entry for /etc/rc.local file configuration does not work
Start by looking at the contents of the /etc/rc.local file to find the cause of the problem.
[[email protected] ~]# cat /etc/rc.local #!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES #**这This file was added for compatibility** # It is highly advisable to create own systemd services or udev rules # to run scripts during boot instead of using this file. #** It is highly advisable to create your own systemd services or udev rules to run scripts during boot instead of using this file. *** # In contrast to previous versions due to parallel execution during boot # This script will NOT be run after all other services. #** In contrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. **Please note that you must run 'parallel execution during boot'. # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during boot. #** Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during boot. touch /var/lock/subsys/local #**Create the file /var/lock/subsys/local**
According to the prompt, it may not execute because the file permissions are insufficient. So, first look at the permissions for the /etc/rc.local file.
[[email protected] ~]# ll /etc/rc.local -rw-r--r--. 1 root root 13 Apr 21 23:06 /etc/rc.local -> rc.d/rc.local
/etc/rc.d/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local
[[email protected] ~]# chmod +x /etc/rc.d/rc.local [[email protected] ~]# ll /etc/rc.d/rc.local -rwxr-xr-x. 1 root root 13 Apr 21 23:06 /etc/rc.d/rc.local
After restarting the server, I found that the boot items set in the /etc/rc.local file are working properly.
- Solution of device eth0 does not see to be present, delaying initialization. Error in network card under Linux
- Termux setting path environment variable
- Linux changing password enter new UNIX password: passwd: authentication token manipulation error
- Running shell script reports an error: “syntax error near unexpected token solution ‘”
- Set the cursor of Ubuntu terminal to turn on automatic display
- After Centos installation is complete, ifconfig: command not found
- Shell Script syntax error near unexpected token `done’
- CentOS/RHEL 7: How to Reinstall GRUB2 from Rescue Mode (EFI)
- Linux Nagios failed to log in to internal server error (Fixed)
- How to Solve Error: Driver “kvm2“ not found
- Configure the node environment under Linux, internal/modules/cjs/loader.js:583 throw err; solution
- [Solved] Login with Ubuntu graphical interface, error sorry, that didn’t work.please try again
- npm ERR! Failed at the [email protected] install script.
- How to Use Apt get Command Under Mac OSX
- Nginx Startup Error: “/var/run/nginx/nginx.pid” failed” [How to Solve]
- U-boot NFS download file error: loading: * * * error: File lookup fail solution
- Summary of unity3d 11 SceneManager scene management usage
- How to Solve Error vim :call CompileRunGcc()
- Solve git upload file error [rejected] master -＞ master (fetch first) error: failed to push some refs to ‘
- scp Command: Unable to negotiate with xxx.xx.xx.xx port 22: no matching cipher found.