You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
519 B
21 lines
519 B
7 years ago
|
#!/bin/sh
|
||
|
|
||
|
if [ -e /var/log/journal ]; then
|
||
|
echo '/var/log/journal exists; not moving journal'
|
||
|
return
|
||
|
fi
|
||
|
|
||
|
echo "switching journal output to disk"
|
||
|
|
||
|
journal=/sysroot/var/log/upgrade.journal
|
||
|
|
||
|
# back up old journal, if present
|
||
|
[ -e $journal ] && rm -rf $journal.old && mv $journal $journal.old
|
||
|
|
||
|
# make output dir and link to it
|
||
|
mkdir -p $journal /var/log
|
||
|
ln -sf $journal /var/log/journal
|
||
|
|
||
|
# tell journald to start writing to /var/log/journal
|
||
|
systemctl kill --kill-who=main --signal=SIGUSR1 systemd-journald.service
|