Changeset 122 for trunk/confman/confman


Ignore:
Timestamp:
12/04/2006 16:38:25 (5 years ago)
Author:
ccowart
Message:

Created the attributes features for storing arbitrary metadata associated
with files. These attributes will be the framework for syntax verification
and {pre,post}-install scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/confman/confman

    r120 r122  
    552552} 
    553553 
     554function lsattr { 
     555    if [ -z "$1" ] ; then 
     556        conf_lsattr * 
     557    else 
     558        conf_lsattr "$@" 
     559    fi 
     560} 
     561 
     562function chattr { 
     563    local attr="$1" 
     564    shift 
     565    local value="${1:-true}" 
     566    shift 
     567    if [ -z "$1" ] ; then print_usage 1 ; fi 
     568 
     569    conf_chattr "$attr" "$value" "$@" 
     570} 
     571 
     572function rmattr { 
     573    local attr="$1" 
     574    shift 
     575    if [ -z "$1" ] ; then print_usage 1 ; fi 
     576 
     577    conf_rmattr "$attr" "$@" 
     578} 
     579 
    554580# Dubug mode? 
    555581while getopts "d" opt ; do 
     
    570596shift 
    571597case $subcommand in 
    572         help )                                                  print_help $* ; exit 0 ;; 
    573         setup|se* )                                             setup $* ;; 
    574         status|st* )                                    status $* ;; 
    575         create|cr* )                                    create $* ;; 
    576         update|u* )                                             update $* ;; 
    577         commit|com* )                                   commit $* ;; 
    578         import|im* )                                    import $* ;; 
    579         install|in* )                                   inst $* ;; 
    580         remove|rem*|rm )                                remove $* ;; 
    581         rev* )                                                  revert $* ;; 
    582         ren* )                                                  rename $* ;; 
    583         rmmod )                                                 rmmod $* ;; 
    584         mkdir|mkd* )                                    newdir $* ;; 
    585         list|ls )                                               list $* ;; 
    586         move|mv )                                               move $* ;; 
    587         copy|cp )                                               copy $* ;; 
    588         diff )                                                  diff $* ;; 
    589         log )                                                   log $* ;; 
    590         chmod )                                                 chmode $* ;; 
    591         chown )                                                 chowner $* ;; 
    592         chcom )                                                 chcom $* ;; 
    593         chgrp )                                                 chgroup $* ;; 
    594         checklook|checklist|chls|chlk ) checklook $* ;; 
    595         checknew|chnw )                                 checknew $* ;; 
    596         checkclear|chcl|chrm )                  checkclear $* ;; 
    597         rollback|ro* )                                  rollback $* ;; 
    598         * )                                                             print_usage 1 ;; 
     598    help )                          print_help "$@" ; exit 0 ;; 
     599    setup|se* )                     setup "$@" ;; 
     600    status|st* )                    status "$@" ;; 
     601    create|cr* )                    create "$@" ;; 
     602    update|u* )                     update "$@" ;; 
     603    commit|com* )                   commit "$@" ;; 
     604    import|im* )                    import "$@" ;; 
     605    install|in* )                   inst "$@" ;; 
     606    remove|rem*|rm )                remove "$@" ;; 
     607    rev* )                          revert "$@" ;; 
     608    ren* )                          rename "$@" ;; 
     609    rmmod )                         rmmod "$@" ;; 
     610    mkdir|mkd* )                    newdir "$@" ;; 
     611    list|ls )                       list "$@" ;; 
     612    lsattr )                        lsattr "$@" ;; 
     613    chattr )                        chattr "$@" ;; 
     614    rmattr )                        rmattr "$@" ;; 
     615    move|mv )                       move "$@" ;; 
     616    copy|cp )                       copy "$@" ;; 
     617    diff )                          diff "$@" ;; 
     618    log )                           log "$@" ;; 
     619    chmod )                         chmode "$@" ;; 
     620    chown )                         chowner "$@" ;; 
     621    chcom )                         chcom "$@" ;; 
     622    chgrp )                         chgroup "$@" ;; 
     623    checklook|checklist|chls|chlk ) checklook "$@" ;; 
     624    checknew|chnw )                 checknew "$@" ;; 
     625    checkclear|chcl|chrm )          checkclear "$@" ;; 
     626    rollback|ro* )                  rollback "$@" ;; 
     627    * )                             print_usage 1 ;; 
    599628esac  
    600629 
    601 # We shouldn't be here. 
    602 exit 1 
     630exit 
    603631 
    604632# vim:ts=4 
Note: See TracChangeset for help on using the changeset viewer.