[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Improve sbin/debian-edu-ltsp-chroot

Wolfgang Schweer (@schweer-guest) gitlab at salsa.debian.org
Sun Oct 3 11:05:55 BST 2021



Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-config


Commits:
b17b6353 by Wolfgang Schweer at 2021-10-03T12:05:06+02:00
Improve sbin/debian-edu-ltsp-chroot

  Use last edit date to improve version information.
  Minor fixes, thanks shellcheck.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -


2 changed files:

- debian/changelog
- sbin/debian-edu-ltsp-chroot


Changes:

=====================================
debian/changelog
=====================================
@@ -25,6 +25,9 @@ debian-edu-config (2.12.5) UNRELEASED; urgency=medium
   * share/debian-edu-config/d-i/finish-install:
     - Run cf-agent in verbose mode to improve log message readability.
   * cf3/cf.dhcpserver: Ensure proper rights for systemd service files.
+  * sbin/debian-edu-ltsp-chroot:
+    - Use last edit date to improve version information.
+    - Minor fixes, thanks shellcheck.
 
  -- Mike Gabriel <sunweaver at debian.org>  Sun, 03 Oct 2021 10:13:28 +0200
 


=====================================
sbin/debian-edu-ltsp-chroot
=====================================
@@ -13,7 +13,9 @@
 # Also, integrated everything into one tool to be usable standalone.
 # 2021 Wolfgang Schweer <wschweer at arcor.de>, distributed under the
 # terms of the GNU General Public License v2 or any later version.
+# first edited:	2020-09-28
 
+version=2021-10-02
 
 # generic functions
 
@@ -35,11 +37,6 @@ Options:
 EOF
 }
 
-debian_edu_version() {
- . /etc/debian-edu/config
- echo $VERSION
-}
-
 default_options() {
     BASE=${BASE:-/srv/ltsp/dlw}
     # If $BASE contains a terminating /, remove it
@@ -126,7 +123,7 @@ umount_marked() {
 
     # Wait until all buffers are flushed, otherwise umount might fail
     sync
-    echo "$MARKED_MOUNTS" | while read dir; do
+    echo "$MARKED_MOUNTS" | while read -r dir; do
         if ! umount "$dir"; then
             warn "Couldn't unmount $dir."
         fi
@@ -139,7 +136,7 @@ umount_marked() {
 
     # Wait until all buffers are flushed, otherwise umount might fail
     sync
-    echo "$MARKED_MOUNTS" | while read dir; do
+    echo "$MARKED_MOUNTS" | while read -r dir; do
         # binfmt_misc might need to be unmounted manually, see LP #534211
         if [ "$dir%/proc}" != "$dir" ] && 
             [ -d "$dir/sys/fs/binfmt_misc" ] && [ -f "$dir/mounts" ] &&
@@ -168,7 +165,7 @@ while true; do
         -h|--help) usage; exit 0 ;;
         -m|--mount-all) MOUNT_ALL=true ;;
         -p|--mount-proc) MOUNT_PROC=true ;;
-        --version) debian_edu_version; exit 0 ;;
+        --version) echo $version; exit 0 ;;
         --) shift; break ;;
         *) die "$0: Internal error!" ;;
     esac
@@ -180,7 +177,7 @@ default_options
 
 require_root
 
-trap "post_chroot" 0 HUP INT QUIT KILL SEGV PIPE TERM
+trap "post_chroot" 0 HUP INT QUIT SEGV PIPE TERM
 pre_chroot
 
 # Unset temporary directory variables to avoid problems when directory



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/b17b6353b4e317ac60e7d728b9cea8d7eb10cc32

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/b17b6353b4e317ac60e7d728b9cea8d7eb10cc32
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20211003/e315c042/attachment-0001.htm>


More information about the debian-edu-commits mailing list