VP
Size: a a a
VP
VP
systemd-swap
, то ответ очевиден. Ну и да. Возможно она смотрит на наличие параметров ядра resume=
и resume_offset=
и дальше остаётся спросить у ФС, а чтой-та у нас за файлик который лежит по смещению resume_offset=133120
? Ага! /hibernate.swp
! Ну значить в него и будем гибернейтиться!VP
resume_offset
вычисляется так: sudo filefrag -v /hibernate.swp|awk '{ if($1=="0:"){print substr($4, 1, length($4)-2)} }'
VP
VP
VP
VP
/* XFS filesystem has incorrect implementation of fiemap ioctl and
* returns extents for only one block-group at a time, so we need
* to handle it manually, starting the next fiemap call from the end
* of the last extent
*/
VP
VP
VP
VP
VP
VP
VP
VP
[Unit]
Description=run cloud_backup_mail_ru before hibernation
Before=sleep.target
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl start cloud_backup_mail_ru.service
[Install]
WantedBy=sleep.target
VP
VP
[Unit]
Description=backup to the MailRu Cloud WebDav
Wants=webdavmailrucloud.service
Before=sleep.target suspend.target hibernate.target hybrid-sleep.target
[Service]
Type=oneshot
StandardOutput=journal
ExecStart={{ CUSTOM_ROOT_BIN_DIR }}cloud_backup_mail_ru.sh
[Install]
WantedBy=sleep.target suspend.target hibernate.target hybrid-sleep.target
VP
VP
[Unit]
After=z-i-prepare.service
Wants=z-i-prepare.service
[Service]
Type=oneshot
User=tinyproxy
Group=tinyproxy
Environment="PATH=/usr/local/bin:/usr/sbin:/usr/bin"
ExecStart=tinyproxy-cfg-gen.sh
StandardOutput=file:/run/tinyproxy/tinyproxy.conf
StandardError=file:/dev/null
Тут есть один лайвхак, который я подсмотрел в недрах поставки yggdrasil
. tinyproxy-cfg-gen.sh
просто выплёвывает готовéнький (© Доктор Дью) конфиг в stdout
, а директива StandartdOutput=
не записывает это в лог, а отправляет в указанный file:/run/tinyproxy/tinyproxy.conf
И вуаля! Нам не надо лезть в баш портянку или перенаправлять вывод, в случае бинарника. Вумная система сама всё делает за нас!