mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 08:33:54 +00:00
nixos/printing: fix ShellCheck issues
ShellCheck reports the following: > SC2174 (warning): When used with -p, -m only applies to the deepest > directory. Avoid this warning by splitting `mkdir -m MODE -p DIR` into `(umask MASK && mkdir -p DIR)`.
This commit is contained in:
parent
eeab2e4e5e
commit
bfe7bb410f
@ -384,14 +384,11 @@ 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 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
|
||||
|
Loading…
Reference in New Issue
Block a user