[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][include-tasks] 2 commits: Add tasks include key word



Title: GitLab

Bastian Blank pushed to branch include-tasks at Debian FTP Team / dak

Commits:

3 changed files:

Changes:

  • config/debian-security/weekly.tasks
    ... ... @@ -2,5 +2,5 @@
    2 2
     LOCK                   DEPLOY                     600                        shared    false
    
    3 3
     LOCK                   UNCHECKED                  1200                       exclusive false
    
    4 4
     update_releases        none                       none                       true      false
    
    5
    -runcronscript          mirror                     none                       true      true
    
    5
    +INCLUDE                mirror                     none                       true      true
    
    6 6
     linkmorgue             none                       none                       false     true

  • config/debian/common
    ... ... @@ -380,14 +380,6 @@ function mklslar() {
    380 380
         done
    
    381 381
     }
    
    382 382
     
    
    383
    -# Run another cronscript from within cronscript, sick bastard
    
    384
    -function runcronscript() {
    
    385
    -    local script=${1:-}
    
    386
    -    if [[ -n ${script} ]]; then
    
    387
    -        $configdir/cronscript ${script}
    
    388
    -    fi
    
    389
    -}
    
    390
    -
    
    391 383
     function linkmorgue() {
    
    392 384
         ${scriptsdir}/link_morgue.sh
    
    393 385
     }
    

  • config/debian/cronscript
    ... ... @@ -85,6 +85,13 @@ EOF
    85 85
             ;;
    
    86 86
     esac
    
    87 87
     
    
    88
    +function includetasks() {
    
    89
    +    local NAME=${1:?}
    
    90
    +
    
    91
    +    _preparetasks ${NAME}
    
    92
    +    _runtasks ${NAME}
    
    93
    +}
    
    94
    +
    
    88 95
     function _preparetasks() {
    
    89 96
         local NAME=${1:?}
    
    90 97
     
    
    ... ... @@ -127,6 +134,7 @@ function _runtasks() {
    127 134
         #                   Note: Only really makes sense at beginning of a tasks file,
    
    128 135
         #                   the stages directory gets cleared at successful exit anyways.
    
    129 136
         #                   RMSTAGE simply ensures that ALL of the crons tasks ALWAYS run.
    
    137
    +    #         INCLUDE - Runs another task list after including corresponding functions
    
    130 138
     
    
    131 139
         # Note 2: If you want to hand an empty value to the stage function,
    
    132 140
         #         use the word "none" in the list below.
    
    ... ... @@ -174,6 +182,9 @@ function _runtasks() {
    174 182
                 UNLOCK)
    
    175 183
                     unlock ${ARGS}
    
    176 184
                     ;;
    
    185
    +            INCLUDE)
    
    186
    +                includetasks ${ARGS}
    
    187
    +                ;;
    
    177 188
                 *)
    
    178 189
                     GO=(
    
    179 190
                         FUNC=${FUNC}
    


  • Reply to: