-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
Execution-ModuleP4Priority 4Priority 4PlatformRelates to OS, containers, platform-based utilities like FS, system based appsRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thisCommunity help is needed to resolve thisseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
When you use the state mount.mounted using persist: True and you have spaces in the name of the device, it saves the name with spaces in /etc/fstab but this file won't understand spaces.
For example:
/mnt/documents:
mount.mounted:
- device: //server/DATA/Factura\ Electronica/Factura\ Nacion
- fstype: cifs
- mkmnt: True
- opts: credentials=/etc/credentials/srvprocess_user,iocharset=utf8,sec=ntlm
- dump: 0
- pass_num: 0
- persist: True
- mkmnt: True
- require:
- file: /etc/credentials/srvprocess_user
- pkg: cifs-utils
- file: /mnt/documents-dir
This example will mount the desired network share, but also add to fstab this line:
//server/DATA/Factura\ Electronica/Factura\ Nacion /mnt/documents cifs credentials=/etc/credentials/srvprocess_user,iocharset=utf8,sec=ntlm 0 0
This will result in not mounting the share again when the system is restarted, because fstab needs another interpretation for whitespaces, is should be like this>
//srvgoogle3/DATA/Factura\040Electronica/Factura\040Nacion /mnt/documents cifs credentials=/etc/credentials/srvprocess_user,iocharset=utf8,sec=ntlm 0 0
Maybe the best fix is to replace '\ ' with '\040' when writing this strings to fstab.
Metadata
Metadata
Assignees
Labels
Execution-ModuleP4Priority 4Priority 4PlatformRelates to OS, containers, platform-based utilities like FS, system based appsRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thisCommunity help is needed to resolve thisseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around3rd level, incorrect or bad functionality, confusing and lacks a work around