Permalink
Browse files

introduce use_hookscript public API call

  • Loading branch information...
1 parent 4d5e121 commit f1b4daef96b89b654f7d5c269f9757e47ce082f9 @falconindy committed Apr 28, 2011
Showing with 14 additions and 10 deletions.
  1. +8 −10 builders/btrfs
  2. +6 −0 geninit.api
View
@@ -1,15 +1,13 @@
-# vim:set ft=sh:
+#!/bin/bash
build() {
- MODULES="$(all_modules btrfs)"
- BINARIES="/sbin/btrfs"
- SCRIPT="btrfs"
+ use_hookscript
+ add_module btrfs
+ add_binary /sbin/btrfs
}
-help ()
-{
-cat <<HELPEOF
- This hook is needed to support Btrfs volumes spread
- over multiple devices.
-HELPEOF
+helpmsg() {
+ cat <<EOF
+ This hook supports multi device btrfs volumes.
+EOF
}
View
@@ -174,6 +174,12 @@ add_device() { # {{{
printf 'nod %s %s 0 0 %s %s %s\n' "$1" "${5:-644}" "${@:2:3}" >> "$cpio_filelist"
} # }}}
+use_hookscript() { # {{{
+ # specifies that a builder should install a hookscript
+ [[ $builder ]] || return 1
+ add_file "$basedir$_sharedir/hooks/$builder" "/hooks/$builder"
+} # }}}
+
add_driver_classes() { # {{{
local -a mods
local mod=

0 comments on commit f1b4dae

Please sign in to comment.