Re: [CentOS] Run as root on reboot
On 10/28/20 4:34 PM, david wrote: During initial setup, I'd like to avoid the manual actions of logging on as root and executing a command, but instead have that command run without intervention. The output of the command would still show up on the terminal that initiated the reboot. Having read this thread, I still can't tell *when* you want a script to run. If you want it to run during the initial install, then I can't make any sense of how that relates to a reboot. If you want to run a command during the setup, then provide a kickstart file with a %post section: https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#chapter-6-post-installation-script If you want to run a command after rebooting and display the command output on the console, then use the openvt command, possibly with the -w flag: https://linux.die.net/man/1/openvt Security is not a concern here. And I don't want to invoke high-powered functions like "jumpstart". If you mean kickstart: I'm pretty sure that's your only option for running commands during the installation. ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] System not logging
Hello. Check if you still have rsyslog installed on that box. On one of my new CentOS 8 servers, rsyslog somehow disappeared (or never was installed). I had to install it manually. Best regards. Robi Il 2020-10-28 16:09 Gary Stainburn ha scritto: One of my boxes has stopped logging some of the things it's supposed to. I use rsyslog which used to send named and dhcpd entries to separate log files. Both named and dhcpd are working. I have shut down the DHCPD server and run it in debug mode and the output is produced as expected. I have shut down rsyslog and run that in debug mode and it looks like everything is running, but it's not receiving messages to log. I tried journalctl | grep -Ei 'dhcpd'|tail and I see the log entries for the service starting up, but no entries for DHCP transactoins happening. My rsyslog also receives network messages from my firewall and they are logging as expected. This suggests to me that the problem is that the log entries are either not being generated, or are not being allowed to get to rsyslog. Anyone go any ideas? I've tried the usual first step, and briefly disabled selinux but that made no difference Gary ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Run as root on reboot
> > By "initial setup", I meant during the initial install of the > operating system, starting from "net-install". Maybe one user is > defined. The reboot command is issued from a script that was > initiated by hand. > So you want it to run as the final part of the install process?? If that's the case, then you should create a kickstart file with the post installation script in it: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax#sect-kickstart-postinstall If you want/need it to run the script after the install has completed and the first reboot, then you need to look at the FirstBoot scripts https://access.redhat.com/solutions/2028143 P. ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Run as root on reboot
On Wed, Oct 28, 2020 at 04:34:32PM -0700, david wrote: > During initial setup, I'd like to avoid the manual actions of [...] > Security is not a concern here. And I don't want to invoke > high-powered functions like "jumpstart". Can you explain the use case a little more here? It may actually _really_ be worth your time to learn about kickstart -- it's highly powerful, but not really "high-powered" in a difficultly sense. -- Matthew Miller Fedora Project Leader ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos