[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/

2022-01-30 Thread Matt Turner
commit: ad04eab48c96350f0866d6c1fe76f289499df21b
Author: Matt Turner  gentoo  org>
AuthorDate: Thu Jul 29 01:10:58 2021 +
Commit: Matt Turner  gentoo  org>
CommitDate: Thu Jul 29 01:13:52 2021 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ad04eab4

catalyst: Remove boot/kernel/*/kernelopts support

This undocumented option was only wired up for hppa, and was used by the
minimal livecd to set panic=30.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 11 ---
 targets/support/bootloader-setup.sh |  8 +---
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 10cffd4c..4a1b4eb6 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -662,7 +662,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "boot/kernel/" + x + "/gk_action",
 "boot/kernel/" + x + "/gk_kernargs",
 "boot/kernel/" + x + "/initramfs_overlay",
-"boot/kernel/" + x + "/kernelopts",
 "boot/kernel/" + x + "/packages",
 "boot/kernel/" + x + "/softlevel",
 "boot/kernel/" + x + "/sources",
@@ -1508,16 +1507,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 return
 self._copy_kernel_config(kname=kname)
 
-# If we need to pass special options to the bootloader
-# for this kernel put them into the environment
-key = 'boot/kernel/' + kname + '/kernelopts'
-if key in self.settings:
-myopts = self.settings[key]
-
-if not isinstance(myopts, str):
-myopts = ' '.join(myopts)
-self.env[kname + "_kernelopts"] = myopts
-
 key = 'boot/kernel/' + kname + '/extraversion'
 self.settings.setdefault(key, '')
 self.env["clst_kextraversion"] = self.settings[key]

diff --git a/targets/support/bootloader-setup.sh 
b/targets/support/bootloader-setup.sh
index a998a420..08d25b59 100755
--- a/targets/support/bootloader-setup.sh
+++ b/targets/support/bootloader-setup.sh
@@ -70,16 +70,10 @@ case ${clst_hostarch} in
boot_kernel_common_name=${first/%32/}
boot_kernel_common_name=${boot_kernel_common_name/%64/}
 
-   for x in ${clst_boot_kernel}
-   do
-   eval kopt=\$clst_boot_kernel_${x}_kernelopts
-   kopts+=(${kopt})
-   done
-
# copy the bootloader for the final image
cp /usr/share/palo/iplboot $1/boot/
 
-   echo "--commandline=0/${boot_kernel_common_name} 
initrd=${first}.igz ${default_append_line[@]} ${kopts[@]}" >> ${icfg}
+   echo "--commandline=0/${boot_kernel_common_name} 
initrd=${first}.igz ${default_append_line[@]}" >> ${icfg}
echo "--bootloader=boot/iplboot" >> ${icfg}
echo "--ramdisk=boot/${first}.igz" >> ${icfg}
for x in ${clst_boot_kernel}



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/

2021-01-18 Thread Matt Turner
commit: adce739a1d4e1c4f5321a705f526ae4759844565
Author: Matt Turner  gentoo  org>
AuthorDate: Mon Jan 18 03:09:30 2021 +
Commit: Matt Turner  gentoo  org>
CommitDate: Mon Jan 18 18:01:21 2021 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=adce739a

catalyst: Call config_profile_link for all targets

This reverts the following two commits, which have no documented
rationale.

Revert "Set the profile by calling eselect."

This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950.

Revert "Drop config_profile_link from the action_sequence for the generic 
stage."

This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997.

Doing so improves the code in two ways:

   1) it makes prepare_sequence identical across all targets, which will
  allow deduplicating some code
   2) it no longer calls eselect profile each time chroot-functions.sh
  is sourced (even for those targets that were still calling
  config_profile_link)

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 1 +
 targets/support/chroot-functions.sh | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 447e073d..9d72e765 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -500,6 +500,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 """Set basic stage1, 2, 3 action sequences"""
 self.prepare_sequence.extend([
 self.unpack,
+self.config_profile_link,
 self.setup_confdir,
 self.portage_overlay,
 ])

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index 2aec018e..88465c31 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -1,8 +1,5 @@
 #!/bin/bash
 
-# Set the profile
-eselect profile set ${clst_target_profile}
-
 # Trap these signals and kill ourselves if received
 # Force ourselves to die if any of these signals are received
 # most likely our controlling terminal is gone



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/

2021-01-18 Thread Matt Turner
commit: e1a706383378a1ed71ea4d4300dfc04b42479390
Author: Matt Turner  gentoo  org>
AuthorDate: Mon Jan 18 03:09:30 2021 +
Commit: Matt Turner  gentoo  org>
CommitDate: Mon Jan 18 17:05:45 2021 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e1a70638

catalyst: Call config_profile_link for all targets

This reverts the following two commits, which have no documented
rationale.

Revert "Set the profile by calling eselect."

This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950.

Revert "Drop config_profile_link from the action_sequence for the generic 
stage."

This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997.

Doing so improves the code in two ways:

   1) it makes prepare_sequence identical across all targets, which will
  allow me to deduplicate some code
   2) it no longer calls eselect profile each time chroot-functions.sh
  is sourced (even for those targets that were still calling
  config_profile_link)

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 1 +
 targets/support/chroot-functions.sh | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 447e073d..9d72e765 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -500,6 +500,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 """Set basic stage1, 2, 3 action sequences"""
 self.prepare_sequence.extend([
 self.unpack,
+self.config_profile_link,
 self.setup_confdir,
 self.portage_overlay,
 ])

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index 2aec018e..88465c31 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -1,8 +1,5 @@
 #!/bin/bash
 
-# Set the profile
-eselect profile set ${clst_target_profile}
-
 # Trap these signals and kill ourselves if received
 # Force ourselves to die if any of these signals are received
 # most likely our controlling terminal is gone



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/

2021-01-18 Thread Matt Turner
commit: 6e494c8d99072a6a6cb5feeafe893510147e51c1
Author: Matt Turner  gentoo  org>
AuthorDate: Mon Jan 18 03:09:30 2021 +
Commit: Matt Turner  gentoo  org>
CommitDate: Mon Jan 18 16:55:29 2021 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6e494c8d

catalyst: Call config_profile_link for all targets

This reverts the following two commits, which have no documented
rationale.

Revert "Set the profile by calling eselect."

This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950.

Revert "Drop config_profile_link from the action_sequence for the generic 
stage."

This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997.

Doing so improves the code in two ways:

   1) it makes prepare_sequence identical across all targets, which will
  allow me to deduplicate some code
   2) it no longer calls eselect profile each time chroot-functions.sh
  is sourced (even for those targets that were still calling
  config_profile_link)

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 1 +
 targets/support/chroot-functions.sh | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0e742acb..bccba11c 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -483,6 +483,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 """Set basic stage1, 2, 3 action sequences"""
 self.prepare_sequence.extend([
 self.unpack,
+self.config_profile_link,
 self.setup_confdir,
 self.portage_overlay,
 ])

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index 2aec018e..88465c31 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -1,8 +1,5 @@
 #!/bin/bash
 
-# Set the profile
-eselect profile set ${clst_target_profile}
-
 # Trap these signals and kill ourselves if received
 # Force ourselves to die if any of these signals are received
 # most likely our controlling terminal is gone



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/

2021-01-17 Thread Matt Turner
commit: e55b5bce1dfd69e767cd17c961267e9bc113ea47
Author: Matt Turner  gentoo  org>
AuthorDate: Mon Jan 18 03:09:30 2021 +
Commit: Matt Turner  gentoo  org>
CommitDate: Mon Jan 18 03:49:48 2021 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e55b5bce

catalyst: Call config_profile_link for all targets

This reverts the following two commits, which have no documented
rationale.

Revert "Set the profile by calling eselect."

This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950.

Revert "Drop config_profile_link from the action_sequence for the generic 
stage."

This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997.

Doing so improves the code in two ways:

   1) it makes prepare_sequence identical across all targets, which will
  allow me to deduplicate some code
   2) it no longer calls eselect profile each time chroot-functions.sh
  is sourced (even for those targets that were still calling
  config_profile_link)

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 1 +
 targets/support/chroot-functions.sh | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index ae13e35f..753f378e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -483,6 +483,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 """Set basic stage1, 2, 3 action sequences"""
 self.prepare_sequence.extend([
 self.unpack,
+self.config_profile_link,
 self.setup_confdir,
 self.portage_overlay,
 ])

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index 2aec018e..88465c31 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -1,8 +1,5 @@
 #!/bin/bash
 
-# Set the profile
-eselect profile set ${clst_target_profile}
-
 # Trap these signals and kill ourselves if received
 # Force ourselves to die if any of these signals are received
 # most likely our controlling terminal is gone



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/

2021-01-17 Thread Matt Turner
commit: 88f38bc955b664741b2473a4316c0b55d622b8ad
Author: Matt Turner  gentoo  org>
AuthorDate: Mon Jan 18 03:09:30 2021 +
Commit: Matt Turner  gentoo  org>
CommitDate: Mon Jan 18 03:27:41 2021 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=88f38bc9

catalyst: Call config_profile_link for all targets

This reverts the following two commits, which have no documented
rationale.

Revert "Set the profile by calling eselect."

This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950.

Revert "Drop config_profile_link from the action_sequence for the generic 
stage."

This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997.

Doing so improves the code in two ways:

   1) it makes prepare_sequence identical across all targets, which will
  allow me to deduplicate some code
   2) it no longer calls eselect profile each time chroot-functions.sh
  is sourced (even for those targets that were still calling
  config_profile_link)

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 1 +
 targets/support/chroot-functions.sh | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 79f00149..5115d029 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -483,6 +483,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 """Set basic stage1, 2, 3 action sequences"""
 self.prepare_sequence.extend([
 self.unpack,
+self.config_profile_link,
 self.setup_confdir,
 self.portage_overlay,
 ])

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index 2aec018e..88465c31 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -1,8 +1,5 @@
 #!/bin/bash
 
-# Set the profile
-eselect profile set ${clst_target_profile}
-
 # Trap these signals and kill ourselves if received
 # Force ourselves to die if any of these signals are received
 # most likely our controlling terminal is gone



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/

2020-12-19 Thread Matt Turner
commit: 03914bb12003cbf1b34be07f356b97c9c06d10fe
Author: Matt Turner  gentoo  org>
AuthorDate: Sat Dec 19 00:23:32 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Sat Dec 19 02:56:52 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=03914bb1

catalyst: Remove set_dest_path()

root_path is always set, so half of this function was dead. The other
half set the same thing as set_stage_path().

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py| 20 ++--
 targets/support/target_image_setup.sh |  4 ++--
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index ba6b1a1b..ed4d1227 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -154,7 +154,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 self.set_source_path()
 self.set_chroot_path()
 self.set_autoresume_path()
-self.set_dest_path()
 self.set_stage_path()
 self.set_target_path()
 
@@ -426,13 +425,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 self.generate_hash(self.settings["source_path"], 
"sha1")
 log.notice('Source path set to %s', self.settings['source_path'])
 
-def set_dest_path(self):
-if "root_path" in self.settings:
-self.settings["destpath"] = normpath(self.settings["chroot_path"] +
- self.settings["root_path"])
-else:
-self.settings["destpath"] = normpath(self.settings["chroot_path"])
-
 def set_cleanables(self):
 self.settings['cleanables'] = [
 "/etc/resolv.conf",
@@ -845,7 +837,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
"/root_overlay"]:
 if os.path.exists(x):
 log.info('Copying root_overlay: %s', x)
-cmd(['rsync', '-a', x + '/', self.settings['destpath']],
+cmd(['rsync', '-a', x + '/', self.settings['stage_path']],
 env=self.env)
 
 def bind(self):
@@ -1095,7 +1087,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 else:
 for x in self.settings["cleanables"]:
 log.notice('Cleaning chroot: %s', x)
-clear_path(normpath(self.settings["destpath"] + x))
+clear_path(normpath(self.settings["stage_path"] + x))
 
 # Put /etc/hosts back into place
 hosts_file = self.settings['chroot_path'] + '/etc/hosts'
@@ -1119,14 +,14 @@ class StageBase(TargetBase, ClearBase, GenBase):
 log.debug("clean(), portage_preix = %s, no sticky-config",
   self.settings["portage_prefix"])
 for _dir in "package.accept_keywords", "package.keywords", 
"package.mask", "package.unmask", "package.use", "package.env", "env":
-target = pjoin(self.settings["destpath"],
+target = pjoin(self.settings["stage_path"],
"etc/portage/%s" % _dir,
self.settings["portage_prefix"])
 log.notice("Clearing portage_prefix target: %s", target)
 clear_path(target)
 
 # Remove hacks that should *never* go into stages
-target = pjoin(self.settings["destpath"], "etc/portage/patches")
+target = pjoin(self.settings["stage_path"], "etc/portage/patches")
 if os.path.exists(target):
 log.warning("You've been hacking. Clearing target patches: %s", 
target)
 clear_path(target)
@@ -1172,7 +1164,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 self.settings[self.settings["spec_prefix"] +
   "/empty"].split()
 for x in self.settings[self.settings["spec_prefix"] + "/empty"]:
-myemp = self.settings["destpath"] + x
+myemp = self.settings["stage_path"] + x
 if not os.path.isdir(myemp) or os.path.islink(myemp):
 log.warning('not a directory or does not exist, '
 'skipping "empty" operation: %s', x)
@@ -1192,7 +1184,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 # We're going to shell out for all these cleaning
 # operations, so we get easy glob handling.
 log.notice('%s: removing %s', self.settings["spec_prefix"], x)
-clear_path(self.settings["destpath"] + x)
+clear_path(self.settings["stage_path"] + x)
 try:
 if os.path.exists(self.settings["controller_file"]):
 cmd([self.settings['controller_file'], 'clean'],

diff --git a/targets/support/target_image_setup.sh 
b/targets/support/target_image_setup.sh
index fdc4a234..f9427eaf 100755
--- a/targets/support/target_image_s

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/

2020-05-26 Thread Matt Turner
commit: 576cbab37a1a6a52b9409c2bf0dfa81c5e36e947
Author: Matt Turner  gentoo  org>
AuthorDate: Thu May 21 22:37:29 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 27 06:21:10 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=576cbab3

catalyst: Clean up unbind() function

Does a couple of things:
- drops log.notice -> log.warning
- Removes the kill_chroot_pids support code since 
  namespaces?

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 45 +++
 targets/support/kill-chroot-pids.sh | 62 -
 2 files changed, 12 insertions(+), 95 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index aa5cafd0..d92f3ffb 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -625,17 +625,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 assert self.settings[verify] == "blake2"
 self.settings.setdefault("gk_mainargs", []).append("--b2sum")
 
-def kill_chroot_pids(self):
-log.info('Checking for processes running in chroot and killing them.')
-
-# Force environment variables to be exported so script can see them
-self.setup_environment()
-
-killcmd = normpath(self.settings["sharedir"] +
-   self.settings["shdir"] + 
"/support/kill-chroot-pids.sh")
-if os.path.exists(killcmd):
-cmd([killcmd], env=self.env)
-
 def mount_safety_check(self):
 """
 Check and verify that none of our paths in mypath are mounted. We don't
@@ -886,35 +875,28 @@ class StageBase(TargetBase, ClearBase, GenBase):
 raise CatalystError
 
 def unbind(self):
-ouch = 0
-mypath = self.settings["chroot_path"]
+chroot_path = self.settings["chroot_path"]
+umount_failed = False
 
 # Unmount in reverse order
-for x in [x for x in reversed(self.mount) if self.mount[x]['enable']]:
-target = normpath(mypath + self.mount[x]['target'])
-if not os.path.exists(target):
-log.notice('%s does not exist. Skipping', target)
+for target in [Path(chroot_path + self.mount[x]['target'])
+   for x in reversed(self.mount)
+   if self.mount[x]['enable']]:
+if not target.exists():
+log.debug('%s does not exist. Skipping', target)
 continue
 
 if not ismount(target):
-log.notice('%s is not a mount point. Skipping', target)
+log.debug('%s is not a mount point. Skipping', target)
 continue
 
 try:
 umount(target)
-except CatalystError:
-log.warning('First attempt to unmount failed: %s', target)
-log.warning('Killing any pids still running in the chroot')
-
-self.kill_chroot_pids()
-
-try:
-umount(target)
-except CatalystError:
-ouch = 1
-log.warning("Couldn't umount bind mount: %s", target)
+except OSError as e:
+log.warning("Couldn't umount bind mount: %s", target)
+umount_failed = True
 
-if ouch:
+if umount_failed:
 # if any bind mounts really failed, then we need to raise
 # this to potentially prevent an upcoming bash stage cleanup script
 # from wiping our bind mounts.
@@ -1307,9 +1289,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 def run(self):
 self.chroot_lock.write_lock()
 
-# Kill any pids in the chroot
-self.kill_chroot_pids()
-
 # Check for mounts right away and abort if we cannot unmount them
 self.mount_safety_check()
 

diff --git a/targets/support/kill-chroot-pids.sh 
b/targets/support/kill-chroot-pids.sh
deleted file mode 100755
index ea8ee402..
--- a/targets/support/kill-chroot-pids.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-# Script to kill processes found running in the chroot.
-
-if [ "${clst_chroot_path}" == "/" ]
-then
-   echo "Aborting  clst_chroot_path is set to /"
-   echo "This is very dangerous"
-   exit 1
-fi
-
-if [ "${clst_chroot_path}" == "" ]
-then
-   echo "Aborting  clst_chroot_path is NOT set"
-   echo "This is very dangerous"
-   exit 1
-fi
-
-j=0
-declare -a pids
-# Get files and dirs in /proc
-for i in `ls /proc`
-do
-   # Test for directories
-   if [ -d /proc/$i ]
-   then
-   # Search for exe containing string inside ${clst_chroot_path}
-   ls -la --color=never /proc/$i 2>&1 |grep exe|grep ${clst_chroot_path} > 
/dev/null
-
-   # If found
-   if [ $? == 0 ]
-   then
-   # Assign the pid into the pids array
-   pids[$