bin/update
changeset 569 3613e93e4fd7
parent 568 3d6bf3864d8a
child 570 b4b590efe3ef
equal deleted inserted replaced
568:3d6bf3864d8a 569:3613e93e4fd7
    33 
    33 
    34 # external progs
    34 # external progs
    35 NAMED_CHECKZONE=/usr/sbin/named-checkzone
    35 NAMED_CHECKZONE=/usr/sbin/named-checkzone
    36 HG=/usr/bin/hg
    36 HG=/usr/bin/hg
    37 RNDC=/usr/sbin/rndc
    37 RNDC=/usr/sbin/rndc
       
    38 RNDC_KEY=/etc/bind/rndc.key
    38 
    39 
    39 ### Command-line argument handling
    40 ### Command-line argument handling
    40 
    41 
    41 IS_TTY=
    42 IS_TTY=
    42 
    43 
   712 #
   713 #
   713 #   deploy_zones    
   714 #   deploy_zones    
   714 #
   715 #
   715 # Invokes `rndc reload`, showing its output.
   716 # Invokes `rndc reload`, showing its output.
   716 function deploy_zones {
   717 function deploy_zones {
       
   718     local msg="Reload zones"
       
   719 
   717     if [ $DEPLOY_SKIP ]; then
   720     if [ $DEPLOY_SKIP ]; then
   718         log_skip "Reload zones: skipped"
   721         log_skip    "$msg: skipped"
   719 
   722     
   720     else
   723     elif [ ! -r $RNDC_KEY ]; then
   721         log_update "Reload zones..."
   724         log_error   "  $msg: rndc: permission denied: $RNDC_KEY"
       
   725 
       
   726     else
       
   727         log_update  "$msg..."
   722 
   728 
   723         # run
   729         # run
   724         indent "        rndc: " \
   730         indent "        rndc: " \
   725             $RNDC reload
   731             $RNDC reload
   726     fi
   732     fi
   732 # Invokes `hg commit` in the $REPO, first showing the diff.
   738 # Invokes `hg commit` in the $REPO, first showing the diff.
   733 function commit_data {
   739 function commit_data {
   734     local repo=$REPO
   740     local repo=$REPO
   735     local commit_msg="$COMMIT_MSG"
   741     local commit_msg="$COMMIT_MSG"
   736 
   742 
   737     local msg="Commit changes in $repo..."
   743     local msg="Commit changes in $repo"
   738 
   744 
   739     # operate?
   745     # operate?
   740     if [ $COMMIT_FORCE ]; then
   746     if [ $COMMIT_FORCE ]; then
   741         log_force   "$msg..."
   747         log_force   "$msg..."
   742 
   748