diff options
author | Christos.K <freedomrfox@gmail.com> | 2017-07-06 22:41:04 +0300 |
---|---|---|
committer | Christos.K <freedomrfox@gmail.com> | 2017-07-06 22:41:04 +0300 |
commit | fb025ec00369b81ea9ed487977a855dde0e78d51 (patch) | |
tree | ad8ad3dc3899391cbf4df3c7d29f3c18ee186f58 | |
parent | Updated cfunctions and module-setup (diff) | |
download | GSE-fb025ec00369b81ea9ed487977a855dde0e78d51.tar.gz GSE-fb025ec00369b81ea9ed487977a855dde0e78d51.tar.bz2 GSE-fb025ec00369b81ea9ed487977a855dde0e78d51.zip |
Minor update
-rw-r--r-- | config.d/controller/modules/cfunctions.sh | 10 | ||||
-rw-r--r-- | config.d/controller/modules/cinit_pre-mount.sh | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/config.d/controller/modules/cfunctions.sh b/config.d/controller/modules/cfunctions.sh index 6b30215..fe3fe2f 100644 --- a/config.d/controller/modules/cfunctions.sh +++ b/config.d/controller/modules/cfunctions.sh @@ -53,7 +53,9 @@ _bsu_dfs() { USERDATASFS="$(cat "${CTCONFDIR}/confdir/devname.info" | sed '/^#/ d' | sed '/^\s*$/d' | grep USERDATA | awk -F ' ' '{ print $3 }')" export USERDATASFS - _sources_exp + if [[ "$_ctflag_net" ]]; then + _sources_exp + fi } server_exp() { @@ -109,7 +111,7 @@ _call_net() { } _mount_sysfs() { - if mount -t "${SYSFS}" -o rw "${SYSDEV}" "/mnt/workdir"; then + if mount -t "${SYSFS}" -o rw "${SYSDEV}" "$1"; then return 0 else return 1 @@ -231,7 +233,7 @@ _unmount() { _chroot_config(){ if _unmount "$1" "$2"; then - if mount_pseudo "$1"; then + if mount_fs && mount_pseudo "$1"; then mkdir -p "$1/var/tmp/ctworkdir" cp -r "${CTCONFDIR}/confdir" "$1/var/tmp/ctworkdir/" cp "/usr/local/controller/cchroot.sh" "$1/var/tmp/ctworkdir/cchroot" @@ -287,7 +289,7 @@ _remake_sysfs() { } _fetch_new_sys() { - if _mount_sysfs; then + if _mount_sysfs "/mnt/workdir"; then if sync -aAXhq "${_M_SERVER}/dist.d/stage3-amd64-${_server_version}.tar.bz2" "${CTCONFDIR}/version"; then echo "New system was fetched successfully" _ctflag_active_system="SYSDEV" diff --git a/config.d/controller/modules/cinit_pre-mount.sh b/config.d/controller/modules/cinit_pre-mount.sh index 0457a9b..a8b9d38 100644 --- a/config.d/controller/modules/cinit_pre-mount.sh +++ b/config.d/controller/modules/cinit_pre-mount.sh @@ -22,3 +22,8 @@ if [[ "${_ctflag_sysfetch}" == 0 ]]; then _fetch_new_sys fi +# CONFIGURATION +if [[ "${_ctflag_net}" ]]; then + _mount_sysfs + _chroot_config "$/mnt/workdir" "workdir" +fi
\ No newline at end of file |