summarylogtreecommitdiffstats
path: root/auxmount_hook
blob: ced0b1eff325a0fbf2422e10de09851dab30b3c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
run_latehook() {
    local _postfix _d

    if [ ! -z "$auxmnt" ]; then
        for _d in /*; do
            case $_d in
                /new_root*)
                _postfix=${_d#/new_root}
                if [ ! -z "$_postfix" ] && [ -d /new_root/"$auxmnt"/root$_postfix ]; then
                    mount --bind $_d /new_root/"$auxmnt"/root$_postfix
                fi
                ;;
            esac
        done
    fi
}