- #
- # ctrlx_prep_mount_nfs4_files.bash - collect Debian files for mount.nfs4
- # so that they work on a CTRL/X ARM64 machine
- #
- # Written by Roland Mainz <roland.mainz@rovema.de>
- #
- #
- # Usage:
- # 1. prep tarball with ARM64 binaries using this script
- # 2. copy resulting 'ctrlx_mount_nfs4_files.tar.bz2' to target machine
- # 3. ssh into target machine
- # 4. execute these commands ('$' is user prompt, '#' is root prompt)
- #
- # $ sudo bash
- # # cp 'ctrlx_mount_nfs4_files.tar.bz2' <path-to-root-dir-of-rexroth-deviceadmin-snap>/.
- # # snap run --shell rexroth-deviceadmin.web
- # # tar --no-same-owner -xf ctrlx_mount_nfs4_files.tar.bz2
- # # $ (LD_LIBRARY_PATH=$PWD/ctrlx_files/lib/aarch64-linux-gnu ctrlx_files/sbin/mount.nfs 10.49.20.131:/net_tmpfs /mnt)
- # # ls -l /mnt
- # total 4
- # -rw-r--r-- 1 4294967294 4294967294 48 Nov 22 16:42 secret.txt
- # drwxr-xr-x 3 4294967294 4294967294 60 Oct 26 08:39 test1
- # # (LD_LIBRARY_PATH=$PWD/ctrlx_files/lib/aarch64-linux-gnu ctrlx_files/sbin/umount.nfs /mnt)
- # umount.nfs: /mnt: block devices not permitted on fs
- #
- set -o errexit
- set -o xtrace
- set -o nounset
- typeset -a urls=(
- 'http://ftp.us.debian.org/debian/pool/main/n/nfs-utils/nfs-common_1.3.4-6_arm64.deb'
- 'http://ftp.us.debian.org/debian/pool/main/libt/libtirpc/libtirpc3_1.3.1-1+deb11u1_arm64.deb'
- 'http://ftp.us.debian.org/debian/pool/main/libt/libtirpc/libtirpc-common_1.3.1-1+deb11u1_all.deb'
- )
- printf $"# %s: Start.\n" "$0"
- mkdir -p 'ctrlx_files'
- for url in "${urls[@]}" ; do
- wget "${url}"
- done
- for deb_ar in *.deb ; do
- ar p "$deb_ar" 'data.tar.xz' | (cd 'ctrlx_files' && tar -xJf -)
- done
- tar -cvf - 'ctrlx_files' | bzip2 -9 >'ctrlx_mount_nfs4_files.tar.bz2'
- printf $"# %s: Done.\n" "$0"
- # EOF.
ctrlx_prep_mount_nfs4_files.bash - collect Debian files for mount.nfs4
Posted by Anonymous on Thu 23rd Nov 2023 16:14
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.