Skip to content

mxproxmox: add check pbackup #286

Merged
merged 7 commits into from
Dec 8, 2022
Merged

mxproxmox: add check pbackup #286

merged 7 commits into from
Dec 8, 2022

Commits on Dec 7, 2022

  1. Configuration menu
    Copy the full SHA
    44b957b View commit details
    Browse the repository at this point in the history
  2. mxproxmox: Move ua creation into subroutine

    We want to add a command which doesn't need to run with privileges to
    read the credential file. Initialization of the ua needs to read the
    credential file. Factor out the code to initialize the ua so that we can
    make that optional on a per-command basis.
    donald committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    8d7e2ef View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    aa24bed View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    641f2ac View commit details
    Browse the repository at this point in the history
  5. mxproxmox: Add command check-pbackup

    Add new command `check-pbackup`, which makes suggestions, what jobs to
    add to /etc/mxproxmox/backup-list.dat based on pbackup configuration.
    
    The output consists of out-commented lines which can be added to
    /etc/mxproxmox/backup-list.dat and uncommented one by one to phase in
    new proxmox backup jobs.
    donald committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    1b5f675 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2022

  1. Configuration menu
    Copy the full SHA
    4cb9474 View commit details
    Browse the repository at this point in the history
  2. mxproxmox: Remove trailing white space from backup-list lines

    Remove trailing whitespace from lines read from backup-list.
    
    If we keep trailing whitespace, the following split will keep the
    whitespace in $opt_limit. This is later checked with `if
    defined($limit)` , which is true. Still, the empty string will evaluate
    numerically to zero (with a warning). A limit zero is not what we want
    here.
    
    From `perldoc -f split`:
    
        When assigning to a list, if LIMIT is omitted, or zero, Perl supplies a
        LIMIT one larger than the number of variables in the list, to avoid
        unnecessary work
    
    This has this surprising effect:
    
          DB<1> x split " ","a   "
        0  'a'
          DB<2> @a = split " ","a   "
          DB<3> x @s
          empty array
          DB<4> x @a
        0  'a'
          DB<5> ($a, $b) = split " ","a   "
          DB<6> x ($a, $b)
        0  'a'
        1  ''
          DB<7>
    donald committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    bbd5231 View commit details
    Browse the repository at this point in the history