Ensure that 'logrotate-config.service' is set as a dependency to start before 'logrotate.service'. (#17312)
* Ensure that 'logrotate-config.service' is set as a dependency to start before 'logrotate.service'.
This commit is contained in:
parent
5d3e5c0094
commit
f13081bfbd
@ -461,6 +461,10 @@ fi
|
||||
## Disable kexec supported reboot which was installed by default
|
||||
sudo sed -i 's/LOAD_KEXEC=true/LOAD_KEXEC=false/' $FILESYSTEM_ROOT/etc/default/kexec
|
||||
|
||||
# Ensure that 'logrotate-config.service' is set as a dependency to start before 'logrotate.service'.
|
||||
sudo mkdir $FILESYSTEM_ROOT/etc/systemd/system/logrotate.service.d
|
||||
sudo cp files/image_config/logrotate/logrotateOverride.conf $FILESYSTEM_ROOT/etc/systemd/system/logrotate.service.d/logrotateOverride.conf
|
||||
|
||||
## Remove sshd host keys, and will regenerate on first sshd start
|
||||
sudo rm -f $FILESYSTEM_ROOT/etc/ssh/ssh_host_*_key*
|
||||
sudo cp files/sshd/host-ssh-keygen.sh $FILESYSTEM_ROOT/usr/local/bin/
|
||||
|
@ -6,6 +6,7 @@ After=updategraph.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/logrotate-config.sh
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
2
files/image_config/logrotate/logrotateOverride.conf
Normal file
2
files/image_config/logrotate/logrotateOverride.conf
Normal file
@ -0,0 +1,2 @@
|
||||
[Unit]
|
||||
Requires=logrotate-config.service
|
Loading…
Reference in New Issue
Block a user