Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

introduce use_hookscript public API call

  • Loading branch information...
commit f1b4daef96b89b654f7d5c269f9757e47ce082f9 1 parent 4d5e121
@falconindy authored
Showing with 14 additions and 10 deletions.
  1. +8 −10 builders/btrfs
  2. +6 −0 geninit.api
View
18 builders/btrfs
@@ -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
6 geninit.api
@@ -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=
Please sign in to comment.
Something went wrong with that request. Please try again.