add PARTLABEL and PARTUUID
[platform/upstream/dracut.git] / modules.d / 05busybox / module-setup.sh
1 #!/bin/bash
2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
4
5 check() {
6     type -P busybox >/dev/null || return 1
7
8     return 255
9 }
10
11 depends() {
12     return 0
13 }
14
15 install() {
16     local _i _progs _path _busybox
17     _busybox=$(type -P busybox)
18     inst $_busybox /usr/bin/busybox
19     for _i in $($_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}')
20     do
21         _progs="$_progs $_i"
22     done
23
24     # FIXME: switch_root should be in the above list, but busybox version hangs
25     # (using busybox-1.15.1-7.fc14.i686 at the time of writing)
26
27     for _i in $_progs; do
28         _path=$(find_binary "$_i")
29         [ -z "$_path" ] && continue
30         ln_r /usr/bin/busybox $_path
31     done
32 }
33