1. works independent from Windows OS language setting
uptime now uses "wmic os get lastbootuptime" which returns just the time.
The former matching relied on matching English text and time format.
2. datetime.now() changed to datetime.datetime.now()
In pkgng the way to install packages and assumming yes in pre and post install scripts is to use
-y, same as apt-get or yum, for example. Also env variable ASSUME_ALWAYS_YES=YES can be used, but
in this case, is a good idea to follow others package manager implementation.
Also remove the check where only -y is used if pkgng is executed in dryrun mode. In this case
there is no difference between dryrun or not.
attempting to run following state
---
/backup:
mount.mounted:
- device: joule:/backup
- fstype: nfs
- mkmnt: True
- opts: rw,nodev,nosuid
getting unexpected behavior:
----------
```
ID: /backup
Function: mount.mounted
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/salt/state.py", line 1591, in call
**cdata['kwargs'])
File "/usr/local/lib/python2.7/site-packages/salt/states/mount.py", line 120, in mounted
active = __salt__['mount.active'](extended=True)
File "/usr/local/lib/python2.7/site-packages/salt/modules/mount.py", line 184, in active
_active_mounts_openbsd(ret)
File "/usr/local/lib/python2.7/site-packages/salt/modules/mount.py", line 148, in _active_mounts_openbsd
'opts': parens[1].split(", "),
IndexError: list index out of range
Started: 21:51:47.764708
Duration: 38.882 ms
```
issue clarification:
---
function _active_mounts_openbsd()
expecting all mount points to have DUID
but NFS mounts do not have DUIDs generated, so line need to be parsed separately
proposal:
---
1. check length of parens array
2. and have a different parsing for lines with no DUIDs in them
testing same state after change:
---
```
Name: /etc/fstab - Function: file.blockreplace - Result: Clean
Name: /d01 - Function: mount.mounted - Result: Clean
Name: /stage - Function: mount.mounted - Result: Clean
Name: /backup - Function: mount.mounted - Result: Changed
```
---
Thanks,
Sergey.
Did not get why, but we can have a list of comments instead of stings.
This fixes:
```
line 107, in _uptodate\n ret['comment'] += '\\n\\nChanges made: ' + comments\nTypeError:
cannot concatenate 'str' and 'list' objects\n"
duration: 366.804
name: https://github.com/makinacorpus/makina-states.git
result: false
```