Changed sheba/util-vserver integration to use pkgs/util-vserver as overlay directory
[sheba.git] / pkgs / util-vserver / D%sysconfdir_vservers_.defaults_scripts_pre-start.sh
bloba2f81ae082c9dae81a1ccacb3e6185c94599c765
1 #!/bin/sh
2 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
3 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
5 # Filename: target/sheba/pkgs/util-vserver/D%sysconfdir_vservers_.defaults_scripts_pre-start.sh
6 # Copyright (C) 2008 The OpenSDE Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- SDE-COPYRIGHT-NOTE-END ---
16 . D_libdir/util-vserver/util-vserver-vars
18 if grep -q '[ ]/dev[ ]' "$__CONFDIR/$2/fstab"; then
19 # guest has /dev as tmpfs
22 install_nodes()
24 local dir="$1" x=
26 for x in $dir/*; do
27 y=dev/${x##*/}
29 [ ! -e "$y" ] || rm -f "$y"
31 cp -a "$x" "$y"
32 done
35 for x in .defaults "$2"; do
36 [ ! -d "$__CONFDIR/$x/dev" ] || install_nodes "$__CONFDIR/$x/dev"
37 done