summarylogtreecommitdiffstats
path: root/subdir_hook
blob: 19cb8fe36351afb8ef9ec3b3fffcde4b75668d7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
run_hook() {
    if [ ! -z "$rootdir" ]; then
        mv /new_root /new_rootimg
        ln -s new_rootimg /new_root
    fi
}

run_latehook() {
    local _rootpath _postfix _d
    if [ ! -z "$rootdir" -a -L /new_root ]; then
        _rootpath=/`readlink /new_root`
        rm /new_root
        mkdir /new_root
        mount --bind $_rootpath/"$rootdir" /new_root
    fi
}