0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 22:20:30 +03:00

[24.11] Fix cupsd ShellCheck issues (#363968)

This commit is contained in:
Wolfgang Walther 2024-12-11 22:05:23 +01:00 committed by GitHub
commit 64ad3ae2ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -384,14 +384,12 @@ in
preStart = lib.optionalString cfg.stateless ''
rm -rf /var/cache/cups /var/lib/cups /var/spool/cups
'' + ''
mkdir -m 0700 -p /var/cache/cups
mkdir -m 0700 -p /var/spool/cups
mkdir -m 0755 -p ${cfg.tempDir}
mkdir -m 0755 -p /var/lib/cups
(umask 022 && mkdir -p /var/cache /var/lib /var/spool)
(umask 077 && mkdir -p /var/cache/cups /var/spool/cups)
(umask 022 && mkdir -p ${cfg.tempDir} /var/lib/cups)
# While cups will automatically create self-signed certificates if accessed via TLS,
# this directory to store the certificates needs to be created manually.
mkdir -m 0700 -p /var/lib/cups/ssl
(umask 077 && mkdir -p /var/lib/cups/ssl)
# Backwards compatibility
if [ ! -L /etc/cups ]; then