diff options
author | Csaba Henk | 2015-09-12 17:59:47 +0200 |
---|---|---|
committer | Csaba Henk | 2015-09-12 18:29:18 +0200 |
commit | 9e6c3e9c022cb0c0b6dd68013d766161286530da (patch) | |
tree | 9bfc8e6d15e8c8f46aba79a0419bba19aa701f29 /subdir_hook | |
download | aur-mkinitcpio-loop-subdir.tar.gz |
Initial commit
Diffstat (limited to 'subdir_hook')
-rw-r--r-- | subdir_hook | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/subdir_hook b/subdir_hook new file mode 100644 index 000000000000..19cb8fe36351 --- /dev/null +++ b/subdir_hook @@ -0,0 +1,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 +} |