Changeset 1928 for trunk/packages/invirt-base
- Timestamp:
- Dec 28, 2008, 2:56:18 AM (16 years ago)
- Location:
- trunk/packages/invirt-base
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-base/debian/changelog
r1926 r1928 2 2 3 3 * run_parts_list: fix unclear docstring 4 * config-init.sh: degrade to non-bash gracefully 4 5 5 6 -- Greg Price <price@mit.edu> Sun, 28 Dec 2008 01:00:07 -0500 -
trunk/packages/invirt-base/files/lib/init/config-init.sh
r1445 r1928 1 1 # For a package which only configures another, "parent" package. 2 2 # 3 # Global variable PARENTPACKAGE names parent; may be array4 # for zero ormany parents.3 # Global variable PARENTPACKAGE names parent; unset for no parent, 4 # array for (zero or one or) many parents. 5 5 # 6 6 # Global variable PACKAGE names this package, for log message. 7 7 # 8 # Requires bash. 8 # If BASH_VERSION is null or unset, accepts only one parent in 9 # PARENTPACKAGE, or empty for zero. 9 10 10 11 . /lib/init/vars.sh 11 12 . /lib/lsb/init-functions 12 13 . /lib/init/gen-files.sh 14 15 if [ $BASH_VERSION ]; then 16 handle_parents () { 17 for p in "${PARENTPACKAGE[@]}"; do 18 invoke-rc.d "$p" "$1" 19 done 20 } 21 else 22 handle_parents () { 23 if [ -n "$PARENTPACKAGE" ]; then 24 invoke-rc.d "$PARENTPACKAGE" "$1" 25 fi 26 } 27 fi 13 28 14 29 config_init () { … … 18 33 gen_files 19 34 log_end_msg $? 20 for p in "${PARENTPACKAGE[@]}"; do 21 invoke-rc.d "$p" "$1" 22 done 35 handle_parents "$1" 23 36 ;; 24 37 stop) 25 for p in "${PARENTPACKAGE[@]}"; do 26 invoke-rc.d "$p" "$1" 27 done 38 handle_parents "$1" 28 39 ;; 29 40 *)
Note: See TracChangeset
for help on using the changeset viewer.