diff --git a/bin/gen-torrent-from-ptcl b/bin/gen-torrent-from-ptcl index a5569458..71d21580 100755 --- a/bin/gen-torrent-from-ptcl +++ b/bin/gen-torrent-from-ptcl @@ -8,7 +8,7 @@ Author: Date Huang ''' ''' This script can generate `torrent` from partclone torrent helper -You need to install `python3-libtorrent` in ubnutu or debian like +You need to install `python3-libtorrent` in Ubuntu or Debian like `apt install python-libtorrent` It will install `libtorrent-rasterbar` for depend diff --git a/clonezilla.spec b/clonezilla.spec index 84195e01..6618eec2 100644 --- a/clonezilla.spec +++ b/clonezilla.spec @@ -3055,7 +3055,7 @@ make install DESTDIR=$RPM_BUILD_ROOT/ * Mon Dec 07 2015 Steven Shiau 3.19.3-drbl1 - Allow ocs-install-grub to run when it's a GPT disk with a special "bios_boot" partition exists in the machine using legacy BIOS. -- Use parted to fill the last partitition to the end of disk because there might be some resudial in the calculation of ocs-expand-gpt-pt. Thanks to Conan for this suggestion. Ref: https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/c5e92d87/?limit=25#080c +- Use parted to fill the last partition to the end of disk because there might be some residual in the calculation of ocs-expand-gpt-pt. Thanks to Conan for this suggestion. Ref: https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/c5e92d87/?limit=25#080c * Mon Nov 23 2015 Steven Shiau 3.19.2-drbl1 - Add option "-scs" to be the same option for "-sc" in drbl-ocs and ocs-sr. This will be easier to tell the differences between saving and restoring image. diff --git a/conf/drbl-ocs.conf b/conf/drbl-ocs.conf index 7cc94bf9..dc0538e0 100644 --- a/conf/drbl-ocs.conf +++ b/conf/drbl-ocs.conf @@ -16,7 +16,7 @@ VOL_LIMIT_DEFAULT="0" # http://en.wikipedia.org/wiki/Megabyte VOL_LIMIT_IN_INTERACTIVE="0" -# Specify the suffix length for spliting the image file of a partition or LV. By default it's 2, i.e. aa, ab, ac... +# Specify the suffix length for splitting the image file of a partition or LV. By default it's 2, i.e. aa, ab, ac... # Integer must >= 2. split_suf_len="2" @@ -91,7 +91,7 @@ dd_buffer_size="1048576" # 1 MB # # ignore the MBR by using -M, we will ignore the error caused by devfs style # in /proc/partitions -# now use -z0 and --volume=0 in DEFAULT_PARTIMAGE_SAVE_OPT, we will use partimage stdout and pipe it to use gzip/bzip2/lzop to compress it, not the compression function in partimge. --volume=0 is a must for stdout. +# now use -z0 and --volume=0 in DEFAULT_PARTIMAGE_SAVE_OPT, we will use partimage stdout and pipe it to use gzip/bzip2/lzop to compress it, not the compression function in partimage. --volume=0 is a must for stdout. DEFAULT_PARTIMAGE_SAVE_OPT="-M -f3 -o -d -b -c -z0 --volume=0" DEFAULT_PARTIMAGE_RESTORE_OPT="-M -f3 -b" @@ -103,7 +103,7 @@ if [ -n "$(LC_ALL=C gzip --help 2>&1 | grep -Ew -- "--rsyncable")" ]; then rsyncable_opt_gzip="--rsyncable" fi extra_gzip_opt="--fast $rsyncable_opt_gzip" -# -1 (fatest), -2, ... -9 (best compression) +# -1 (fastest), -2, ... -9 (best compression) extra_bzip2_opt="-3" extra_lzop_opt="-3" extra_lzma_opt="-3" @@ -179,7 +179,7 @@ PARTCLONE_RESTORE_OPT_INIT="-z 10485760" # The debug_level for partimage # it's better we turn off the debug mode by default, this will reduce the server's loading. -# It seems in partiamge 0.6.5-beta2, when using --debug=0 to save NTFS partition +# It seems in partimage 0.6.5-beta2, when using --debug=0 to save NTFS partition # partimage will crash. However, 0.6.5-beta1 works without this problem. # To avoid this, we set debug_level=1 as default value. debug_level="1" @@ -193,11 +193,11 @@ POSTACTION_DEF="reboot" # If you are impatient, you can set it as "-f -n" so it will force halt or reboot, don't call shutdown sequence, and do not sync. i.e. poweroff/reboot immediately. Note! This might fail your wake-on-LAN since it's not a normal soft-shutdown. # In some case (clonezilla live), we might overwrite this option to let it do normal poweroff/reboot. HALT_REBOOT_OPT="" -# To avoid all the clients notify at almost same time, we use random sleep before send info. This is the maximun time limit (in secs). +# To avoid all the clients notify at almost same time, we use random sleep before send info. This is the maximum time limit (in secs). NOTIFY_OCS_SERVER_TIME_LIMIT="20" # OCS_PRERUN_DIR & OCS_POSTRUN_DIR -# Run the script in the direcoty $OCS_POSTRUN_DIR before clone starts and finishes. The command will be run before that assigned in -p or --postaction." +# Run the script in the directory $OCS_POSTRUN_DIR before clone starts and finishes. The command will be run before that assigned in -p or --postaction." OCS_PRERUN_DIR="$DRBL_SCRIPT_PATH/prerun/ocs/" OCS_POSTRUN_DIR="$DRBL_SCRIPT_PATH/postrun/ocs/" @@ -369,7 +369,7 @@ supp_boot_param_ocs_live_dev="$supp_boot_param_ocs_live_iso noeject" # live-initramfs uses /live/image. # For Debian Live 3.x, rootfs is in /lib/live/mount/medium/live/filesystem.squashfs live_media_path_chklist="/run/live/medium /lib/live/mount/medium /lib/live/image /live/image /live_media /cdrom /run/live/persistence" -# Possible kernel/initrd paths in live CD/USB-disk are /casper (created by casper), /live (created by live-initramfs) or /isolinux (created by live pacakge with casper), or "/" (when using toram="filesystem.squashfs", filesystem.squashfs will be copied to / in the ram disk). +# Possible kernel/initrd paths in live CD/USB-disk are /casper (created by casper), /live (created by live-initramfs) or /isolinux (created by live package with casper), or "/" (when using toram="filesystem.squashfs", filesystem.squashfs will be copied to / in the ram disk). live_sys_files_dir_list="live / isolinux casper" # For live-package, it's "/usr/share/make-live/hooks", for live-helper... live_pkg_hook_dir="/usr/share/make-live/hooks" diff --git a/debian/changelog b/debian/changelog index 110e3c76..242df41a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4970,7 +4970,7 @@ clonezilla (3.19.3-drbl1) unstable; urgency=low * Allow ocs-install-grub to run when it's a GPT disk with a special "bios_boot" partition exists in the machine using legacy BIOS. - * Use parted to fill the last partitition to the end of disk because + * Use parted to fill the last partition to the end of disk because there might be some resudial in the calculation of ocs-expand-gpt-pt. Thanks to Conan for this suggestion. Ref: https://sourceforge.net/p/clonezilla/discussion/ diff --git a/doc/ChangeLog.txt b/doc/ChangeLog.txt index bf4bd9fd..4d3fdeff 100644 --- a/doc/ChangeLog.txt +++ b/doc/ChangeLog.txt @@ -4975,7 +4975,7 @@ clonezilla (3.19.3-drbl1) unstable; urgency=low * Allow ocs-install-grub to run when it's a GPT disk with a special "bios_boot" partition exists in the machine using legacy BIOS. - * Use parted to fill the last partitition to the end of disk because + * Use parted to fill the last partition to the end of disk because there might be some resudial in the calculation of ocs-expand-gpt-pt. Thanks to Conan for this suggestion. Ref: https://sourceforge.net/p/clonezilla/discussion/ diff --git a/postrun/ocs/00-readme.txt b/postrun/ocs/00-readme.txt index 60c971ef..f27cb864 100644 --- a/postrun/ocs/00-readme.txt +++ b/postrun/ocs/00-readme.txt @@ -1,4 +1,4 @@ -# The scripts in this direcoty will be run by run-parts comamnd AFTER ocs-sr starts. +# The scripts in this directory will be run by run-parts command AFTER ocs-sr starts. # //NOTE//: # (1) You need to enable the option "-o1" otherwise it won't work. # (2) The scripts here is nothing to do with the option "-p" or "--postaction" of ocs-sr, and they will be run before that assigned in -p or --postaction." diff --git a/prerun/ocs/00-readme.txt b/prerun/ocs/00-readme.txt index 4d32d89d..bedfaa19 100644 --- a/prerun/ocs/00-readme.txt +++ b/prerun/ocs/00-readme.txt @@ -1,3 +1,3 @@ -# The scripts in this direcoty will be run by run-parts comamnd BEFORE ocs-sr starts. +# The scripts in this directory will be run by run-parts command BEFORE ocs-sr starts. # //NOTE//: # You need to enable the option "-o1" otherwise it won't work. diff --git a/samples/create-1P-pt-sf b/samples/create-1P-pt-sf index 0692372f..35d71a3c 100755 --- a/samples/create-1P-pt-sf +++ b/samples/create-1P-pt-sf @@ -12,7 +12,7 @@ # WARNING!!! WARNING!!! WARNING!!! # WARNING!!! WARNING!!! WARNING!!! # YOU HAVE BEEN WARNED! -# This is a dangerous program! Do not run it as root in any machine unless you want to re-create the partition table as the followiing rules! +# This is a dangerous program! Do not run it as root in any machine unless you want to re-create the partition table as the following rules! # THIS PROGRAM WILL DELETE ALL THE DATA IN YOUR DISK!!! # Settings diff --git a/samples/create-2P-pt-sf b/samples/create-2P-pt-sf index b6f4520b..364c4ce1 100755 --- a/samples/create-2P-pt-sf +++ b/samples/create-2P-pt-sf @@ -13,7 +13,7 @@ # WARNING!!! WARNING!!! WARNING!!! # WARNING!!! WARNING!!! WARNING!!! # YOU HAVE BEEN WARNED! -# This is a dangerous program! Do not run it as root in any machine unless you want to re-create the partition table as the followiing rules! +# This is a dangerous program! Do not run it as root in any machine unless you want to re-create the partition table as the following rules! # THIS PROGRAM WILL DELETE ALL THE DATA IN YOUR DISK!!! # Settings diff --git a/samples/custom-ocs-1 b/samples/custom-ocs-1 index ecb2f033..2fa32b6a 100755 --- a/samples/custom-ocs-1 +++ b/samples/custom-ocs-1 @@ -38,7 +38,7 @@ ocs-prep-repo -t samba_server # 3. Restore the image if mountpoint $ocsroot &>/dev/null; then - # Here we use "-p true" (not "-p choose", "-p reboot", or "-p poweroff") to avoid the reboot/poweroff command being run in jfbterm/bterm. Let the ocs-live-final-action and ocs-live-run-menu to take care of the reboot/poweroff actions. Otherwise the Debian live "Press Enter to continue" message after poweroff/shutdown command is issued might be coverd by jfbterm/bterm and user will not have any idea what's happening after ocs-sr is run. + # Here we use "-p true" (not "-p choose", "-p reboot", or "-p poweroff") to avoid the reboot/poweroff command being run in jfbterm/bterm. Let the ocs-live-final-action and ocs-live-run-menu to take care of the reboot/poweroff actions. Otherwise the Debian live "Press Enter to continue" message after poweroff/shutdown command is issued might be covered by jfbterm/bterm and user will not have any idea what's happening after ocs-sr is run. ocs-sr -g auto -e1 auto -e2 -c -r -j2 -p true restoredisk "ask_user" "ask_user" else [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE diff --git a/samples/custom-ocs-3 b/samples/custom-ocs-3 index 7b95a8c8..181515d4 100755 --- a/samples/custom-ocs-3 +++ b/samples/custom-ocs-3 @@ -20,7 +20,7 @@ check_from_usb="yes" # Functions USAGE() { echo "$ocs - To save or restore an image from USB device using Clonezilla live" - echo "This prrogram is to save the image from hard drive to 2nd partition of USB flash drive, which contains 2 partitions:" + echo "This program is to save the image from hard drive to 2nd partition of USB flash drive, which contains 2 partitions:" echo "(1) 1st partition: Clonezilla live, customized with ocs_live_run to run this program." echo "(2) 2nd partition: image repository, which contains only image." echo "Usage:" diff --git a/samples/gen-netcfg b/samples/gen-netcfg index 1e754ab1..f62d39d4 100755 --- a/samples/gen-netcfg +++ b/samples/gen-netcfg @@ -3,7 +3,7 @@ # License: GPL # Description: This file is used to be assign network configuration based on a data file. It is intended to put as a start up service or put it in the rc.local file. # The data file contains the list: -# MAC address, IP address, netmask, gateway, DNS, ethetnet port, hostname name. +# MAC address, IP address, netmask, gateway, DNS, Ethernet port, hostname name. # e.g. # 00:AA:BB:CC:DD:E1 192.168.1.1 255.255.255.0 168.95.100.254 168.95.1.1 eth0 mars1.domain # 00:AA:BB:CC:DD:E2 192.168.1.10 255.255.255.0 168.95.100.254 168.95.1.1 eth0 mars2.domain diff --git a/samples/gen-rec-iso b/samples/gen-rec-iso index 4df11ff9..ec970316 100755 --- a/samples/gen-rec-iso +++ b/samples/gen-rec-iso @@ -86,7 +86,7 @@ while [ $# -gt 0 ]; do ;; -nogui|--nogui) shift; - # -nogui is for backward compatable, better to use --nogui + # -nogui is for backward compatibility, better to use --nogui tui="false" ;; -x|--extra-boot-param) diff --git a/samples/gen-rec-usb b/samples/gen-rec-usb index c4f59961..e126c3a7 100755 --- a/samples/gen-rec-usb +++ b/samples/gen-rec-usb @@ -38,7 +38,7 @@ USAGE() { echo "-b, --batch Run image checking in batch mode" echo "-nogui, --nogui Do not show GUI (TUI) of Partclone or Partimage, use text only" echo "-p, --preset-dest-dev DEV Preset the destination device when restoring. If not assigned, $preset_dest_dev will be used." - echo "-s, --semi-batch Run image checking in semi-batch mode, i.e. just comfirm once" + echo "-s, --semi-batch Run image checking in semi-batch mode, i.e. just confirm once" echo "SRC_HARD_DRIVE is the hard drive to be taken as an image, e.g. sda, sdb..." echo "DEST_USB_FLASH_DRIVE is the USB flash drive partition name, e.g. sdf1, sdg1..." echo "If no SRC_HARD_DRIVE/DEST_USB_FLASH_DRIVE is specified, a dialog menu will be shown." @@ -71,7 +71,7 @@ while [ $# -gt 0 ]; do ;; -nogui|--nogui) shift; - # -nogui is for backward compatable, better to use --nogui + # -nogui is for backward compatibility, better to use --nogui tui="false" ;; -*) echo "${0}: ${1}: invalid option" >&2 diff --git a/samples/mdisks-checksum b/samples/mdisks-checksum index 32f3257d..d9a8317d 100755 --- a/samples/mdisks-checksum +++ b/samples/mdisks-checksum @@ -42,12 +42,12 @@ USAGE() { echo "-i, --initial-no NO Set the initial number for the label, and it is appended to the prefix assigned by option -p or --label-prefix. By default the initial number is set as $initial_no_def. e.g. my-image_01, my-image_02..." echo "-nogui, --nogui Do not show GUI (TUI) of Partclone or Partimage, use text only. In this program, only works for saving mode, not restoring mode because for multiple disks deployment, TUI is always off." echo "-n, --no-resize Do not resize in the destination disk. Keep the size as that from source image. This implies the options '-k1 -r -icds' will not be used for clonezilla's program ocs-sr." - echo "-r, --no-parallel Do not run the checksum inspection in parallel. By default the inspection for all partitions in a disk will be run in parallel. Maybe it's not a good idea to run in parallel if too many partitions so it might casue too many I/Os then less effiency." + echo "-r, --no-parallel Do not run the checksum inspection in parallel. By default the inspection for all partitions in a disk will be run in parallel. Maybe it's not a good idea to run in parallel if too many partitions so it might cause too many I/Os then less efficiency." echo "-p, --label-prefix PREFIX Set the label prefix for the destination partitions when restoring. This is only for modes 'restore' and 'check-then-label', and it will be used to create a sequential label names for all the partitions on destination disks, like my-image_01p1, my-image_01p2 for disk /dev/sda1, and /dev/sda2, respectively." echo "MODE is for saving, restoring, checking, labeling. Available: save, restore, check, check-then-label (or ctl)." echo "IMAGE_NAME is the image dir name, not absolute path" - echo "DEVICE is the device name, e.g. sda, sda... When MODE is 'save', only one disk is allowed. While when MODE is 'restore', more than one disks are accetable." - echo "If IMAGE_NAME and DEVICE are not assigned. An dialog menu will be shown to allow inputing or choosing." + echo "DEVICE is the device name, e.g. sda, sda... When MODE is 'save', only one disk is allowed. While when MODE is 'restore', more than one disks are acceptable." + echo "If IMAGE_NAME and DEVICE are not assigned. A dialog menu will be shown to allow inputting or choosing." echo "Ex:" echo "To save disk /dev/sda as the image \"my-image\" with checksum for all files generated, run" echo " $ocs save my-image sda" @@ -77,7 +77,7 @@ do_restore_or_check_mode_ask_image_dev_if_required() { img_name="$target_dir" fi [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING - echo "$msg_the_image_to_be_cheked: $img_name" + echo "$msg_the_image_to_be_verified: $img_name" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL if [ "$disk" = "ask_user" ]; then diff --git a/sbin/clonezilla b/sbin/clonezilla index 796d459c..be1b04d1 100755 --- a/sbin/clonezilla +++ b/sbin/clonezilla @@ -31,7 +31,7 @@ USAGE() { # Note! OCS_OPT should not use -s/-S/-a/-b/-z/0-6 # because: /sbin/init [ -a ] [ -s ] [ -b ] [ -z xxx ] [ 0123456Ss ] echo " -k, --skip-ocs-prep-repo Skip preparing the clonezilla image home directory (assume it's ready), this is specially for device <-> image clone." - echo " -p, --postaction [choose|poweroff|reboot|command|CMD] When save/restoration finishs, choose action in the client, poweroff, reboot (default), in command prompt or run CMD" + echo " -p, --postaction [choose|poweroff|reboot|command|CMD] When save/restoration finishes, choose action in the client, poweroff, reboot (default), in command prompt or run CMD" echo " -s, --skip-lite-menu Do not show live-server and lite-client in the dialog menu." echo "Ex. $0 -l en" } # end of USAGE @@ -140,7 +140,7 @@ check_DIA_set_ESC $DIA #### main #### ############## -# //NOTE// For ocs-sr, the short option for postaction is: -p, while for ocs-onthelfy, it's -pa. Therefore we use "--postaction" +# //NOTE// For ocs-sr, the short option for postaction is: -p, while for ocs-onthefly, it's -pa. Therefore we use "--postaction" [ -n "$postaction" ] && postaction_opt="--postaction $postaction" [ "$do_prep_ocsroot" = "no" ] && dev_img_opt="-s" diff --git a/sbin/create-debian-live b/sbin/create-debian-live index f1c5229a..cb226282 100755 --- a/sbin/create-debian-live +++ b/sbin/create-debian-live @@ -1,7 +1,7 @@ #!/bin/bash # Author: Steven Shiau # License: GPL -# Description: This script will create a Debian live CD iso which is used as a template for clonezilla image with restoration function. +# Description: This script will create a Debian live CD ISO which is used as a template for clonezilla image with restoration function. # set -e @@ -51,7 +51,7 @@ USAGE() { echo "OPTION:" echo "-a, --packages PKG Specify to add PKG, e.g. firmware-bnx2" echo "-b, --branch [s|stable|t|testing|u|unstable|e|experimental] Specify the DRBL branch to be used in Live CD. Default is stable." - echo "-c, --categories CAT Sepcify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified." + echo "-c, --categories CAT Specify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified." echo "-d, --debian-dist [stable|testing|unstable|lenny|squeeze|wheezy|sid...] Assign Debian dist, the default is $DEBIAN_DIST_DEF if not assigned." echo "-e, --ramfs-size SIZE Use SIZE (bytes) as the size of RAM for working dir. Default is $ramfs_size_def." echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 586, 686, amd64, arm64 or armhf. If it's not assigned, $cpu_flavor_default will be used." @@ -124,7 +124,7 @@ build_it() { # Don't be confused. It won't be appended. Therefore we have to put all required ones. $pref lb config --bootappend-live "boot=live union=overlay config username=user" # Enable cache-indices, by doing this, "apt-get upgrade" won't be run in lb chroot_sources after hook since we might assign older package version when building. - # This is important especially when there is newer live-boot in Sid. E.g. on 2014/Apr/1 live-boot 4.0 alpha is aviailable, but we still want to keep using 3.0.1-1.drbl4. If --cache-indices is set true, live-boot is upgraded, and 4.0 is installed on the system after filesystem.squashfs is created. Then the initrd.img is re-created again, with live-boot 4.x in initrd.img. It will be inconsistent with what we want. + # This is important especially when there is newer live-boot in Sid. E.g. on 2014/Apr/1 live-boot 4.0 alpha is available, but we still want to keep using 3.0.1-1.drbl4. If --cache-indices is set true, live-boot is upgraded, and 4.0 is installed on the system after filesystem.squashfs is created. Then the initrd.img is re-created again, with live-boot 4.x in initrd.img. It will be inconsistent with what we want. $pref lb config --cache-indices true $pref lb config --cache-packages false $pref lb config --apt-indices false @@ -136,7 +136,7 @@ build_it() { 686*|586*|486*) # Default bootloaders in live-build is syslinux,grub-efi (for i386/amd64) # No need to run "$pref lb config --bootloaders syslinux,grub-efi" - # //NOTE// This option "--binary-images" is for template iso only, not for Clonezilla live iso. + # //NOTE// This option "--binary-images" is for template ISO only, not for Clonezilla live ISO. $pref lb config --binary-images iso-hybrid # Add those x86 only packages pkgs="$pkgs $PKG_FROM_DBN_WHICH_OCS_LIVE_NEED_X86_ONLY" diff --git a/sbin/create-drbl-live b/sbin/create-drbl-live index 3dbc986d..d04b0917 100755 --- a/sbin/create-drbl-live +++ b/sbin/create-drbl-live @@ -53,7 +53,7 @@ USAGE() { language_help_prompt_by_idx_no echo "-a, --initsystem [sysvinit|systemd] Specify the init system for live system. Default is systemd" echo "-b, --branch [s|stable|t|testing|u|unstable|e|experimental] Specify the DRBL branch to be used in Live CD. Default is stable." - echo "-c, --categories CAT Sepcify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified." + echo "-c, --categories CAT Specify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified." echo "-d, --debian-dist [stable|testing|unstable|lenny|squeeze|wheezy|sid...] Assign Debian dist, the default is $DEBIAN_DIST_DEF if not assigned." echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 586 or 686. If it's not assigned, $cpu_flavor_default will be used." echo "-g, --drbl-repo-url URL Assign the DRBL repository URL instead of default one $DRBL_REPOSITORY_URL_def." @@ -188,7 +188,7 @@ create_drbl_live_iso(){ if [ "$output_mode" = "cdwriter" -a type wodim &>/dev/null ]; then [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE - echo "Program wodim is not aviailable! You have to install it." + echo "Program wodim is not available! You have to install it." [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL echo "$msg_program_stop" exit 1 @@ -311,7 +311,7 @@ create_drbl_live_iso(){ # generate the menu # For isolinux # The reason to use "--toram-mode live" is to make "toram" boot menu for live-boot to copy - # the files from live direcotry, i.e. not only filesystem.squashfs, but also vmlinuz and + # the files from live directory, i.e. not only filesystem.squashfs, but also vmlinuz and # initrd.img so that drbl-sl can find the vmlinuz and initrd.img to put in # /tftpboot/nbi_img/ for drbl clients. ocs-live-boot-menu -s -vb -l $lang_answer --title "DRBL Live" --toram-mode live -f 785 -n "$version_no" -k /$sys_files_dir/$krnfile -i /$sys_files_dir/$irdfile -m $pxelinux_bg_img --boot-param "$boot_param $live_extra_boot_param" -r "* Boot menu for BIOS machine" isolinux $ISOSYSLNX_TMP/syslinux/ @@ -544,7 +544,7 @@ create_drbl_live_zip() { isolinux_ver="$(LC_ALL=C strings $USB_TMP/syslinux/isolinux.bin | grep "^ISOLINUX" | awk -F" " '{print $2}')" fi put_syslinux_makeboot_for_usb_flash $USB_TMP $isolinux_ver - # just store it. since big files, like squash flie and opt_drbl.tgz are compressed, it's not necessary to compress it again. + # just store it. since big files, like squash file and opt_drbl.tgz are compressed, it's not necessary to compress it again. [ -e "$WD/$real_target_zip" ] && rm -f $WD/$real_target_zip # Before packing it, make sure all the mode is writable chmod -R u+w $USB_TMP @@ -965,7 +965,7 @@ if [ "$use_existing_stage1_iso" = "no" ]; then # Don't be confused. It won't be appended. Therefore we have to put all required ones. $pref lb config --bootappend-live "boot=live union=overlay union=overlay config username=user" # Enable cache-indices, by doing this, "apt-get upgrade" won't be run in lb chroot_sources after hook since we might assign older package version when building. - # This is important especially when there is newer live-boot in Sid. E.g. on 2014/Apr/1 live-boot 4.0 alpha is aviailable, but we still want to keep using 3.0.1-1.drbl4. If --cache-indices is set true, live-boot is upgraded, and 4.0 is installed on the system after filesystem.squashfs is created. Then the initrd.img is re-created again, with live-boot 4.x in initrd.img. It will be inconsistent with what we want. + # This is important especially when there is newer live-boot in Sid. E.g. on 2014/Apr/1 live-boot 4.0 alpha is available, but we still want to keep using 3.0.1-1.drbl4. If --cache-indices is set true, live-boot is upgraded, and 4.0 is installed on the system after filesystem.squashfs is created. Then the initrd.img is re-created again, with live-boot 4.x in initrd.img. It will be inconsistent with what we want. $pref lb config --cache-indices true $pref lb config --cache-packages false $pref lb config --apt-indices false diff --git a/sbin/create-drbl-live-by-pkg b/sbin/create-drbl-live-by-pkg index 29081ceb..c72dbd5e 100755 --- a/sbin/create-drbl-live-by-pkg +++ b/sbin/create-drbl-live-by-pkg @@ -62,7 +62,7 @@ USAGE() { echo "OPTION:" echo "-a, --initsystem [sysvinit|systemd] Specify the init system for live system. Default is systemd" echo "-b, --branch [s|stable|t|testing|u|unstable|e|experimental] Specify the DRBL branch to be used in Live CD. Default is stable." - echo "-c, --categories CAT Sepcify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified." + echo "-c, --categories CAT Specify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified." echo "-d, --debian-dist [stable|testing|unstable|etch|lenny|sid...] Assign Debian dist, the default is $DEBIAN_DIST_DEF if not assigned." echo "-e, --drbl-live-branch [s|stable|t|testing|u|unstable|e|experimental] specifies the DRBL live branch to be used in Live CD. Default is stable." echo "-er, --enable-ramfs Use RAM as the working dir." diff --git a/sbin/create-gparted-live b/sbin/create-gparted-live index 92f751c4..383cff98 100755 --- a/sbin/create-gparted-live +++ b/sbin/create-gparted-live @@ -18,7 +18,7 @@ DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" # Since from live-build 3.0~a55 "minimal" for debootstrap was removed. We use the option --variant of "debootstrap", i.e. "minbase" for minimal. debian_type="minbase" DEBIAN_DIST_DEF="sid" -# Do not assign any Xorg packges except xorg here. Let the Debian dependence decide that. +# Do not assign any Xorg packages except xorg here. Let the Debian dependence decide that. #Xorg_pkgs="xserver-xorg xfonts-base xserver-xorg-video-all xserver-xorg-input-mouse xserver-xorg-input-kbd xserver-xorg-input-evdev xserver-xorg-input-all-" # Adding xserver-xorg-legacy to let non-root user can run startx since we use startx in GParted live. While not using it in DRBL live so this is different from that in DRBL live. # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807015 @@ -82,8 +82,8 @@ USAGE() { echo "$prog [OPTION]" echo "OPTION:" language_help_prompt_by_idx_no - echo "-b, --branch [s|stable|t|testing|u|unstable|e|experimental] Sepcify the DRBL branch to be used in Live CD. Default is stable." - echo "-c, --categories CAT Sepcify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified." + echo "-b, --branch [s|stable|t|testing|u|unstable|e|experimental] Specify the DRBL branch to be used in Live CD. Default is stable." + echo "-c, --categories CAT Specify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified." echo "-d, --debian-dist [stable|testing|unstable|jessie|strech|sid...] Assign Debian dist, the default is $DEBIAN_DIST_DEF if not assigned." echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 586, 686 or amd64. If it's not assigned, $cpu_flavor_default will be used." echo "-g, --drbl-repo-url URL Assign the DRBL repository URL instead of default one $DRBL_REPOSITORY_URL_def." @@ -213,7 +213,7 @@ create_gparted_live_iso(){ if [ "$output_mode" = "cdwriter" -a type wodim &>/dev/null ]; then [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE - echo "Program wodim is not aviailable! You have to install it." + echo "Program wodim is not available! You have to install it." [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL echo "$msg_program_stop" exit 1 @@ -546,7 +546,7 @@ create_gparted_live_zip() { isolinux_ver="$(LC_ALL=C strings $USB_TMP/syslinux/isolinux.bin | grep "^ISOLINUX" | awk -F" " '{print $2}')" fi put_syslinux_makeboot_for_usb_flash $USB_TMP $isolinux_ver - # just store it. since big files, like squash flie and opt_drbl.tgz are compressed, it's not necessary to compress it again. + # just store it. since big files, like squash file and opt_drbl.tgz are compressed, it's not necessary to compress it again. [ -e "$WD/$real_target_zip" ] && rm -f $WD/$real_target_zip # Before packing it, make sure all the mode is writable chmod -R u+w $USB_TMP @@ -959,7 +959,7 @@ if [ "$use_existing_stage1_iso" = "no" ]; then # Don't be confused. It won't be appended. Therefore we have to put all required ones. $pref lb config --bootappend-live "boot=live union=overlay config username=user" # Enable cache-indices, by doing this, "apt-get upgrade" won't be run in lb chroot_sources after hook since we might assign older package version when building. - # This is important especially when there is newer live-boot in Sid. E.g. on 2014/Apr/1 live-boot 4.0 alpha is aviailable, but we still want to keep using 3.0.1-1.drbl4. If --cache-indices is set true, live-boot is upgraded, and 4.0 is installed on the system after filesystem.squashfs is created. Then the initrd.img is re-created again, with live-boot 4.x in initrd.img. It will be inconsistent with what we want. + # This is important especially when there is newer live-boot in Sid. E.g. on 2014/Apr/1 live-boot 4.0 alpha is available, but we still want to keep using 3.0.1-1.drbl4. If --cache-indices is set true, live-boot is upgraded, and 4.0 is installed on the system after filesystem.squashfs is created. Then the initrd.img is re-created again, with live-boot 4.x in initrd.img. It will be inconsistent with what we want. $pref lb config --cache-indices true $pref lb config --cache-packages false $pref lb config --apt-indices false diff --git a/sbin/create-ocs-tmp-img b/sbin/create-ocs-tmp-img index ce9bfbfb..57e3b132 100755 --- a/sbin/create-ocs-tmp-img +++ b/sbin/create-ocs-tmp-img @@ -141,7 +141,7 @@ if [ "$cvt_dev" = "yes" ]; then fi fi -# By default we put the new image in /tmp, since we need a filesystem can be symbolic linked. Otherwise it will fail, like CD (readonly) or samba server (FAT does not support symbolic link) +# By default we put the new image in /tmp, since we need a filesystem that can be symbolic linked. Otherwise it will fail, like CD (read-only) or samba server (FAT does not support symbolic link) if [ -z "$new_imghome" ]; then new_imghome="/tmp" else diff --git a/sbin/create-ubuntu-live b/sbin/create-ubuntu-live index d492be9a..0c2992df 100755 --- a/sbin/create-ubuntu-live +++ b/sbin/create-ubuntu-live @@ -53,7 +53,7 @@ USAGE() { echo "OPTION:" echo "-a, --packages PKG Specify to add PKG, e.g. firmware-bnx2" echo "-b, --branch [s|stable|t|testing|u|unstable|e|experimental] Specify the DRBL branch to be used in Live CD. Default is stable." - echo "-c, --categories CAT Sepcify the category, e.g. 'main', 'main universe', default is \'$categories_default\' if not specified." + echo "-c, --categories CAT Specify the category, e.g. 'main', 'main universe', default is \'$categories_default\' if not specified." echo "-d, --ubuntu-dist [bionic|focal|impish|jammy|kinetic] Assign Ubuntu dist, the default is $DEBIAN_DIST_DEF if not assigned." echo "-e, --ramfs-size SIZE Use SIZE (bytes) as the size of RAM for working dir. Default is $ramfs_size_def." echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 386, amd64, arm64 or armhf. If it's not assigned, $cpu_flavor_default will be used." @@ -155,7 +155,7 @@ build_it(){ # "linux-image-5.4.0-4" is assigned by "--linux-packages" # "amd64" is assigned by "--linux-flavours" $pref lb config --linux-packages "${kernel_pkg}" - # For Uubntu 12.10+, linux-image has spilt as linux-image and linux-image-extra + # For Ubuntu 12.10+, linux-image has spilt as linux-image and linux-image-extra # Ref: https://lists.ubuntu.com/archives/kernel-team/2012-May/020448.html pkgs="$pkgs ${kernel_extra_pkg}" else @@ -198,7 +198,7 @@ build_it(){ $pref lb config --zsync false # Enable cache-indices, by doing this, "apt-get upgrade" won't be run in lb chroot_sources after hook since we might assign older package version when building. - # This is important especially when there is newer live-boot in Sid. E.g. on 2014/Apr/1 live-boot 4.0 alpha is aviailable, but we still want to keep using 3.0.1-1.drbl4. If --cache-indices is set true, live-boot is upgraded, and 4.0 is installed on the system after filesystem.squashfs is created. Then the initrd.img is re-created again, with live-boot 4.x in initrd.img. It will be inconsistent with what we want. + # This is important especially when there is newer live-boot in Sid. E.g. on 2014/Apr/1 live-boot 4.0 alpha is available, but we still want to keep using 3.0.1-1.drbl4. If --cache-indices is set true, live-boot is upgraded, and 4.0 is installed on the system after filesystem.squashfs is created. Then the initrd.img is re-created again, with live-boot 4.x in initrd.img. It will be inconsistent with what we want. $pref lb config --cache-indices true $pref lb config --cache-packages false $pref lb config --apt-indices false diff --git a/sbin/drbl-ocs b/sbin/drbl-ocs index d8bf3338..710183f7 100755 --- a/sbin/drbl-ocs +++ b/sbin/drbl-ocs @@ -70,7 +70,7 @@ USAGE() { echo " -y, -y0, --always-restore, --always-restore-default-local Let Clonezilla server as restore server, i.e. client will always has restore mode to choose (However default mode in PXE menu is local boot)" echo " -y1, --always-restore-default-clone Let Clonezilla server as restore server, i.e. client will always has restore mode to choose (The default mode in PXE menu is clone, so if client boots, it will enter clone always, i.e. clone forever)" echo " -y2, --always-restore-default-drbl Let Clonezilla server as restore server, i.e. client will always has restore mode to choose (The default mode in PXE menu is drbl, so if client boots, it will enter drbl client mode)" - echo " -ssnf, --skip-set-netboot-first Skip setting 1st boot device as network in uEFI netboot client NVRAM" + echo " -ssnf, --skip-set-netboot-first Skip setting 1st boot device as network in UEFI netboot client NVRAM" USAGE_reserved_word_for_restore echo echo " General options:" @@ -128,7 +128,7 @@ prepare_pxecfg_for_pxe_ocs_live_if_required() { client_kb_options="$XKBOPTIONS" fi if [ -z "$client_kb_layout" ]; then - # If no keybouard layout is found, set it as that + # If no keyboard layout is found, set it as that # is assigned in drbl-ocs.conf, force to update it. client_kb_layout="$ocs_live_keymap_for_pxe_ocs_live" # For the rest (model, variant or options they might be nothing. @@ -186,7 +186,7 @@ restore_mbr="yes" restore_prebuild_mbr="no" rm_win_swap_hib="no" select_img_in_client="no" -# default output for udpcast stderr is surpressed. +# default output for udpcast stderr is suppressed. # NOTE! Do not redirect it to standard output (stdin), otherwise partimage/ntfsclone pipe will get wrong image! udpcast_stderr="/dev/null" # default not to run those scripts in $OCS_PRERUN_DIR $OCS_POSTRUN_DIR @@ -200,9 +200,9 @@ gen_b2sum="no" check_b2sum="no" gen_chksum_for_files_in_dev="no" chk_chksum_for_files_in_dev="no" -chk_img_restoreable_mod_save="yes" -chk_img_restoreable_mod_restore="yes" -chk_img_restoreable_on_srv="yes" +chk_img_restorable_mod_save="yes" +chk_img_restorable_mod_restore="yes" +chk_img_restorable_on_srv="yes" # Parse command-line options while [ $# -gt 0 ]; do @@ -377,7 +377,7 @@ while [ $# -gt 0 ]; do OCS_OPT="$OCS_OPT -m \"$module_to_load\"" ;; -n|--no-nfs-restart) - # This function is deprecated, and it's not necesssary (since we already set nfs_restart="no"), but we have to be compatable with the old version. We will remove this in the future. + # This function is deprecated, and it's not necessary (since we already set nfs_restart="no"), but we have to be compatible with the old version. We will remove this in the future. nfs_restart="no" shift;; -f|--nfs-restart) @@ -439,7 +439,7 @@ while [ $# -gt 0 ]; do OCS_OPT="$OCS_OPT -z9p" shift;; -nogui|--nogui) - # -nogui is for backward compatable, better to use --nogui + # -nogui is for backward compatible, better to use --nogui OCS_OPT="$OCS_OPT --nogui" shift;; -ntfs-ok|--ntfs-ok) @@ -530,7 +530,7 @@ while [ $# -gt 0 ]; do OCS_OPT="$OCS_OPT --use-partclone" shift;; -j|--create-part-by-sfdisk) - # We leave this option for backward compatability. + # We leave this option for backward compatibility. OCS_OPT="$OCS_OPT --create-part-by-sfdisk" shift;; -j0|--create-part-by-dd) @@ -596,7 +596,7 @@ while [ $# -gt 0 ]; do OCS_OPT="$OCS_OPT -hn1 $win_hostname_prefix" ;; -o|-o1|--run-postrun-dir) - # -o is for backward compatability + # -o is for backward compatibility run_postrun_dir="yes" OCS_OPT="$OCS_OPT --run-postrun-dir" shift;; @@ -670,18 +670,18 @@ while [ $# -gt 0 ]; do ;; -sc0|--skip-check-restorable-on-srv) # flag to check if the image is restorable on clonezilla server - chk_img_restoreable_on_srv="no" + chk_img_restorable_on_srv="no" shift ;; -sc|-scs|--skip-check-restorable|--skip-check-restorable-s) # flag to check if the image is restorable - chk_img_restoreable_mod_save="no" + chk_img_restorable_mod_save="no" OCS_OPT="$OCS_OPT -scs" shift ;; -scr|--skip-check-restorable-r) # Flag to check if the image is restorable - chk_img_restoreable_mod_restore="no" + chk_img_restorable_mod_restore="no" OCS_OPT="$OCS_OPT -scr" shift ;; @@ -743,7 +743,7 @@ echo $msg_delimiter_star_line echo $msg_delimiter_star_line if [ "$verbose" = "on" ]; then - # The default output for udpcast stderr is surpressed, now turn it on + # The default output for udpcast stderr is suppressed, now turn it on udpcast_stderr="/dev/stderr" fi @@ -773,7 +773,7 @@ else echo -n "Clean all the previous saved config file if they exist..." clean_stale_node_pxe_cfg # Only for those non-stop case we will clean the GRUB UEFI NB config files - # Otherwise if only /tftpboot/nbi_img/grub.cfg exist, the GRUB EFI NB clienet can not boot into local disk because the original "local-disk" menuentry is only a template. For the real working one, .e.g. grub.cfg-01-00-0c-29-7d-29-b7, it's the one created by ocsmgrd. + # Otherwise if only /tftpboot/nbi_img/grub.cfg exist, the GRUB EFI NB client can not boot into local disk because the original "local-disk" menu-entry is only a template. For the real working one, .e.g. grub.cfg-01-00-0c-29-7d-29-b7, it's the one created by ocsmgrd. if [ "$drbl_ocs_type" != "stop" ]; then clean_stale_node_grub_efi_cfg fi @@ -804,15 +804,15 @@ prepare_pxecfg_for_pxe_ocs_live_if_required [ -z "$postaction" ] && postaction="$POSTACTION_DEF" # If the image is checked on the server, then we force to skip image checking on the clients when restoring. -if [ "$chk_img_restoreable_on_srv" = "yes" ]; then - chk_img_restoreable_mod_restore="no" +if [ "$chk_img_restorable_on_srv" = "yes" ]; then + chk_img_restorable_mod_restore="no" OCS_OPT="$OCS_OPT -scr" else # When image is not checked on the server, how about the client? Only select_in_client mode we will make it to be check on the clients. if [ ! "$drbl_ocs_type" = "select_in_client" ]; then if [ -n "$(echo $task | grep -i "restore")" ]; then # Not in select_in_client mode, skip checking in the clients. - chk_img_restoreable_mod_restore="no" + chk_img_restorable_mod_restore="no" OCS_OPT="$OCS_OPT -scr" fi fi diff --git a/sbin/drbl-ocs-live-prep b/sbin/drbl-ocs-live-prep index f0b668b5..c76933ad 100755 --- a/sbin/drbl-ocs-live-prep +++ b/sbin/drbl-ocs-live-prep @@ -19,7 +19,7 @@ clonezilla_iso_branch_def="stable" # Functions USAGE() { - echo "Prepare the Clonezilla SE (Server Edtion) to use Clonezilla live as the OS of client." + echo "Prepare the Clonezilla SE (Server Edition) to use Clonezilla live as the OS of client." echo "Usage: $0 [OPTION]" echo "OPTION:" echo "-a, --client-arch ARCH: Force to use the CPU arch for the client. E.g. if i686-pae is assigned, the i686-pae version of Clonezilla live will be downloaded and use for the clients. Available arch are: i386, amd64 for Ubuntu-based (alternative) branch, and i686, i686-pae, amd64 for Debian-based (regular) release. //NOTE// By using this, the original file name assigned in the option '-i' will be changed as appropriate file name." diff --git a/sbin/ocs-btsrv b/sbin/ocs-btsrv index 8207e36c..35f773bc 100755 --- a/sbin/ocs-btsrv +++ b/sbin/ocs-btsrv @@ -6,9 +6,9 @@ # A. For seeder: # Part 1: create metainfo file (.torrent) # Part 2: start tracker -# Part 3: start bitorrent client program +# Part 3: start bittorrent client program # B. For leecher: -# Only 1: start bitorrent client program +# Only 1: start bittorrent client program # DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" @@ -142,7 +142,7 @@ create_metainfo_file(){ fi } # end of create_metainfo_file # -start_tarcker() { +start_tracker() { d_file="$btlog_dir/${idir_name}-dfile" log_file="$btlog_dir/${idir_name}-tracker.log" tracker_pid_log="$btlog_dir/${idir_name}-tracker.pid" @@ -165,9 +165,9 @@ start_tarcker() { tracker_pid="$!" echo "$tracker_pid" > $tracker_pid_log wait_bt_port_open $port_b -} # end of start_tarcker +} # end of start_tracker # -start_bitorrent_client_program_in_seeder() { +start_bittorrent_client_program_in_seeder() { ct_pid_log="$btlog_dir/${idir_name}-torrent.pid" # Used for non-ezio bt client if [ "$bt_client" = "lftp" ]; then cmd_start_seeding="lftp -c torrent -O $(dirname $ocsroot_btzone/${idir}) $ocsroot_btzone/${idir}.torrent" @@ -220,14 +220,14 @@ start_bitorrent_client_program_in_seeder() { echo "$ct_pid" > $ct_pid_log echo $msg_delimiter_star_line fi -} # end of start_bitorrent_client_program_in_seeder +} # end of start_bittorrent_client_program_in_seeder # -start_bitorrent_client_program_in_leecher() { +start_bittorrent_client_program_in_leecher() { # No matter bt_slices_from_dev is "img" or "raw-dev", in the leecher the command for ezio is the same # Collect multiple torrent files. Make it like: # ezio -U -T sda1.torrent -L /dev/sda1 -T sda2.torrent -L /dev/sda2 ezio_start_seeding_param="$ezio_start_seeding_param -T $ocsroot_btzone/${idir}.torrent -L /dev/$ipt" -} # end of start_bitorrent_client_program_in_leecher +} # end of start_bittorrent_client_program_in_leecher # start_bt_srv() { local ipt idir idir_name @@ -290,7 +290,7 @@ start_bt_srv() { idir="$img_dir/$(to_filename $ipt)" # e.g., xenial-x64-20161104/sda1 # idir_name is the name for log usage - get_idir_name $idir # Obtian $idir_name, e.g., xenial-x64-20161104~sda1 + get_idir_name $idir # Obtain $idir_name, e.g., xenial-x64-20161104~sda1 if [ "$run_mode" = "seeder" ]; then # Prepare port no @@ -300,24 +300,24 @@ start_bt_srv() { create_metainfo_file echo $msg_delimiter_star_line # Part 2: start tracker - start_tarcker + start_tracker echo $msg_delimiter_star_line - # Part 3: start bitorrent client program + # Part 3: start bittorrent client program ezio_seeder_leecher_opt="$ezio_seeder_opt -U" - start_bitorrent_client_program_in_seeder + start_bittorrent_client_program_in_seeder else # For leecher: - # Start bitorrent client program + # Start bittorrent client program ezio_seeder_leecher_opt="$ezio_leecher_opt" - start_bitorrent_client_program_in_leecher + start_bittorrent_client_program_in_leecher fi done - # For ezio case, in start_bitorrent_client_program_in_seeder and - # start_bitorrent_client_program_in_leecher we only collect the options. Now run it. + # For ezio case, in start_bittorrent_client_program_in_seeder and + # start_bittorrent_client_program_in_leecher we only collect the options. Now run it. if [ -n "$ezio_start_seeding_param" ]; then get_ezio_prog # get the variable ezio_prog # //NOTE// The working dir for ezio is the working dir as torrent file - # E.g., ezio -U -f /home/partimag/btzone/xenial-x64-20161104/sda1.torrrent /home/partimag/btzone/xenial-x64-20161104 + # E.g., ezio -U -f /home/partimag/btzone/xenial-x64-20161104/sda1.torrent /home/partimag/btzone/xenial-x64-20161104 ezio_cache_opt="" if [ -n "$($ezio_prog -h | grep -Eo -- "--cache")" ]; then # Set memory limit @@ -379,7 +379,7 @@ stop_bt_srv() { for ipt in $parts; do idir="$img_dir/$(to_filename $ipt)" # idir_name is the name for log usage - get_idir_name $ipt # Obtian $idir_name + get_idir_name $ipt # Obtain $idir_name ct_pid_log_prefix="${ct_pid_log_prefix}~$(to_filename $ipt)" # Possible tracker pid file and torrent pid file, there is ezio part later. id_file="$btlog_dir/${idir_name}-tracker.pid $btlog_dir/${idir_name}-torrent.pid" @@ -510,7 +510,7 @@ shift # The partition name, e.g. sda1, sda2 parts="$(strip_leading_dev $*)" # No matter the input is like /dev/sda1 or sda1, format it as sda1. -# Load deafult values if not specified. +# Load default values if not specified. [ -z "$metainfo_creator" ] && metainfo_creator="$metainfo_creator_def" [ -z "$bt_client" ] && bt_client="$bt_client_def" if [ "$bt_slices_from_dev" = "raw-dev" ]; then diff --git a/sbin/ocs-chkimg b/sbin/ocs-chkimg index ccf4698b..2cd59a51 100755 --- a/sbin/ocs-chkimg +++ b/sbin/ocs-chkimg @@ -48,7 +48,7 @@ img_check_by_partclone() { local cmd_partclone_check split_flag link_flag check_flag run_cmd_ local -a retcodes='()' # First, we find the filesystem - # $target_d, $img_file are globle variables + # $target_d, $img_file are global variables file_="$(unalias ls &>/dev/null; ls $target_d/$img_file.*-img* 2>/dev/null | sort | head -n 1)" file_basename="$(basename ${file_})" if [ -n "${file_}" ]; then @@ -239,17 +239,17 @@ do_partition_or_lv_img_check() { # For some of the special partition, even it's dd, we do not need to check that. E.g. VMware vmkcore partition. It only need partition ID=fc, we do not care the content of the file system. Ref: http://communities.vmware.com/thread/85788 # The saved image is from dd if [ -e "$target_d/$img_file.dd-img.info" ]; then - # Get the paritition info, we will get "$partition" + # Get the partition info, we will get "$partition" . $target_d/$img_file.dd-img.info fi if [ "$partition" = "VMware_vmkcore_partition" ]; then - echo "VMware vmkcore partition found. No ndeed to check the file system." | tee --append ${OCS_LOGFILE} + echo "VMware vmkcore partition found. No need to check the file system." | tee --append ${OCS_LOGFILE} rc=0 elif [ "$partition" = "BSD_slice" ]; then - echo "BSD slice found. No ndeed to check the file system." | tee --append ${OCS_LOGFILE} + echo "BSD slice found. No need to check the file system." | tee --append ${OCS_LOGFILE} rc=0 elif [ "$partition" = "BSD_swap_partition" ]; then - echo "BSD swap partition found. No ndeed to check the file system." | tee --append ${OCS_LOGFILE} + echo "BSD swap partition found. No need to check the file system." | tee --append ${OCS_LOGFILE} rc=0 else [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING @@ -391,7 +391,7 @@ task_checkimage() { get_target_dir_name_when_checking_img_restorable # output: target_dir fi [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING - echo "$msg_the_image_to_be_cheked: $target_dir" + echo "$msg_the_image_to_be_verified: $target_dir" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL ecryptfs_rc="1" @@ -445,13 +445,13 @@ task_checkimage() { image_type="disk" [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_a_disk_image_saved_from_hd: $(get_disk_list_from_img $ocsroot/$target_dir)" - echo "$msg_the_part_image_to_be_cheked: $target_parts" + echo "$msg_the_part_image_to_be_verified: $target_parts" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL elif [ -e "$ocsroot/$target_dir/parts" ]; then image_type="partition" [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_a_part_image_saved_from_partitions: $(get_parts_list_from_img $ocsroot/$target_dir)" - echo "$msg_the_part_image_to_be_cheked: $target_parts" + echo "$msg_the_part_image_to_be_verified: $target_parts" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL else [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE @@ -632,7 +632,7 @@ task_checkimage() { if [ -z "$lks_mapper" ]; then [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_luks_mapped_name_not_found_in_this_file: $target_dir_fullpath/luks-crypttab-from-OS.info." - echo "$msg_name_it_arbitrarily_restered_os_boot_might_fail" + echo "$msg_name_it_arbitrarily_restored_os_boot_might_fail" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL countdown 5 echo @@ -711,7 +711,7 @@ while [ $# -gt 0 ]; do ;; -nogui|--nogui) shift; - # -nogui is for backward compatable, better to use --nogui + # -nogui is for backward compatible, better to use --nogui nogui="on" ;; -*) echo "${0}: ${1}: invalid option" >&2 diff --git a/sbin/ocs-chnthn b/sbin/ocs-chnthn index 5a73f285..4f9aa527 100755 --- a/sbin/ocs-chnthn +++ b/sbin/ocs-chnthn @@ -54,7 +54,7 @@ declare HN_VARI_BITS=6; declare WIN_HN="non-assign" declare ACTIVE_MODE="interact" -declare NTFSMOUNTPROG="ntfs-3g ntfsmount " # check needed execute progarm +declare NTFSMOUNTPROG="ntfs-3g ntfsmount " # check needed execute program declare DEFAULT_WIN_ROOT="WINDOWS WINNT" # windows root directory declare WIN_SYSTEM_SAM="system32/config/system" # System-specific part (HKEY_LOCAL_MACHINE\System) declare WIN_SOFTWARE_SAM="system32/config/software" # Software-Specific part (HKEY_LOCAL_MACHINE\SOFTWARE) @@ -141,7 +141,7 @@ check_if_root ask_and_load_lang_set decide_regeditor Select_ntfsmount_prog $NTFSMOUNTPROG -Perpare_Env # check fuse for kernel +Prepare_Env # check fuse for kernel # Real start if [ -z "$HDDEV" ]; then @@ -206,7 +206,7 @@ fi cp -f "$tmWinRegScript" "/tmp/.ocs-chnthn.log" -# Start to process each selected partation +# Start to process each selected partition for id in $prepartarr do [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING && echo -e "** Process: ${PART_DEV_ARR[$id]}" && [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL; diff --git a/sbin/ocs-cvt-dev b/sbin/ocs-cvt-dev index 25da777f..91f809c5 100755 --- a/sbin/ocs-cvt-dev +++ b/sbin/ocs-cvt-dev @@ -160,10 +160,10 @@ check_input_hd $tgt_dev if [ "$batch_mode" = "no" ]; then [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_uppercase_Warning!!! $msg_uppercase_Warning!!! $msg_uppercase_Warning!!!" - echo "$msg_uppercase_Warning! THIS ACTION IS RISKY! THE CONVERTION MAYBE WILL LET CLIENT FAIL TO BOOT!" + echo "$msg_uppercase_Warning! THIS ACTION IS RISKY! THE CONVERSION MAY MAKE THE CLIENT FAIL TO BOOT!" echo "NOTE!" echo "(1) The OS itself from image \"$image_name\" should support the device driver, such as SCSI or SATA if you convert it to SCSI/SATA." - echo "(2) If the OS itself from image \"$image_name\" is GNU/Linux, maybe you have to modify the /etc/fstab inside it. You can do that after cloing it to harddisk, then boot it into single user mode, or use Live CD/DRBL client mode to make it." + echo "(2) If the OS itself from image \"$image_name\" is GNU/Linux, maybe you have to modify the /etc/fstab inside it. You can do that after cloning it to harddisk, then boot it into single user mode, or use Live CD/DRBL client mode to make it." [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL wait_for_confirm fi @@ -235,7 +235,7 @@ for ifile in $files_2_be_mod_about_parts; do LC_ALL=C perl -pi -e "s|$src_dev[p]?|${tgt_dev}p|g" "$ocsroot/$image_name/$ifile" ;; *) - # [p]? is for cciss device partitions, e.g. when convering cciss/c0d0 to sda, i.e. cciss/c0d0p1 -> sda1 + # [p]? is for cciss device partitions, e.g. when converting cciss/c0d0 to sda, i.e. cciss/c0d0p1 -> sda1 LC_ALL=C perl -pi -e "s|$src_dev[p]?|$tgt_dev|g" "$ocsroot/$image_name/$ifile" ;; esac @@ -260,7 +260,7 @@ for ifile in $files_2_be_mod_about_parts_sc; do LC_ALL=C perl -pi -e "s|/dev/$src_dev[p]?|/dev/${tgt_dev}p|g" "$ocsroot/$image_name/$ifile" ;; *) - # [p]? is for cciss device partitions, e.g. when convering cciss/c0d0 to sda, i.e. cciss/c0d0p1 -> sda1 + # [p]? is for cciss device partitions, e.g. when conversing cciss/c0d0 to sda, i.e. cciss/c0d0p1 -> sda1 LC_ALL=C perl -pi -e "s|/dev/$src_dev[p]?|/dev/$tgt_dev|g" "$ocsroot/$image_name/$ifile" ;; esac @@ -316,7 +316,7 @@ done <<< "$filenames_2_be_mod_about_disk" while read -r im; do [ ! -e "$im" ] && continue imname="$(LC_ALL=C basename "$im")" - # [p]? is for cciss device partitions, e.g. when convering cciss/c0d0 to sda + # [p]? is for cciss device partitions, e.g. when converting cciss/c0d0 to sda # cciss/c0d0p1 -> sda1 case $tgt_dev in cciss*|mmcblk*|md*|rd*|ida*|nvme*|nbd*|loop*) @@ -345,7 +345,7 @@ while read -r im; do newname="$(LC_ALL=C echo $imname| sed -r -e "s/$(to_filename ${src_dev})[p]?/$(to_filename ${tgt_dev})p/g")" ;; *) - # [p]? is for cciss device partitions, e.g. when convering cciss/c0d0 to sda + # [p]? is for cciss device partitions, e.g. when converting cciss/c0d0 to sda # cciss/c0d0p1 -> sda1 newname="$(LC_ALL=C echo $imname| sed -r -e "s/$(to_filename ${src_dev})[p]?/$(to_filename ${tgt_dev})/g")" ;; @@ -376,7 +376,7 @@ done <<< "$filenames_2_be_mod_about_swap" while read -r im; do [ ! -e "$im" ] && continue imname="$(LC_ALL=C basename "$im")" - # [p]? is for cciss device partitions, e.g. when convering cciss/c0d0 to sda + # [p]? is for cciss device partitions, e.g. when converting cciss/c0d0 to sda # cciss/c0d0p1 -> sda1 case $tgt_dev in cciss*|mmcblk*|md*|rd*|ida*|nvme*|nbd*|loop*) diff --git a/sbin/ocs-cvtimg-comp b/sbin/ocs-cvtimg-comp index 2fef10fc..79f67faa 100755 --- a/sbin/ocs-cvtimg-comp +++ b/sbin/ocs-cvtimg-comp @@ -15,7 +15,7 @@ DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" # Settings verbose="no" -chk_img_restoreable_def="yes" +chk_img_restorable_def="yes" # USAGE() { @@ -30,7 +30,7 @@ USAGE() { echo "-nogui, --nogui Do not show GUI (TUI) of Partclone when checking, use text only" echo "-sc, --skip-check-restorable Skip checking the image if restorable after it is converted." echo "-v, --verbose Prints verbose information" - echo "-z0, --no-compress Convert to uncompression format" + echo "-z0, --no-compress Convert to uncompressed format" echo "-z1, --gzip-compress Convert to gzip format" echo "-z2, --bz2-compress Convert to bzip2 format" echo "-z3, --lzo-compress Convert to lzop format" @@ -42,7 +42,7 @@ USAGE() { echo "-z9, --zstd-compress Convert to zstd format" echo "SRC_IMAGE_NAME and DEST_IMAGE_NAME are the image dir name, not absolute path" echo "If the destination compression format is not assigned, XZ format will be used" - echo "If \"ask_user\" is used as SRC_IMAGE_NAME or DEST_IMAGE_NAME, a dialog menu will be shown to allow selection or inputing." + echo "If \"ask_user\" is used as SRC_IMAGE_NAME or DEST_IMAGE_NAME, a dialog menu will be shown to allow selection or inputting." echo "If no SRC_IMAGE_NAME or DEST_IMAGE_NAME is specified, a dialog menu will be shown." echo "Ex:" echo "To convert the image \"my-image\", which is located in $ocsroot/my-image to \"my-image-xz\" with xz format, run" @@ -136,8 +136,8 @@ ask_if_check_converted_img() { 2> $TMP sc_opt="$(cat $TMP)" case "$sc_opt" in - -sc) chk_img_restoreable="no";; - *) chk_img_restoreable="yes";; + -sc) chk_img_restorable="no";; + *) chk_img_restorable="yes";; esac [ -f "$TMP" ] && rm -f $TMP } # ask_if_check_converted_img @@ -471,7 +471,7 @@ task_convertimage() { image_type="partition" [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_a_part_image_saved_from_partitions: $(get_parts_list_from_img $ocsroot/$target_dir)" - echo "$msg_the_part_image_to_be_cheked: $target_parts" + echo "$msg_the_part_image_to_be_verified: $target_parts" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL else [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE @@ -644,12 +644,12 @@ while [ $# -gt 0 ]; do [ -z "$ocsroot" ] && USAGE && exit 1 ;; -nogui|--nogui) - # -nogui is for backward compatable, better to use --nogui + # -nogui is for backward compatibility, better to use --nogui nogui="on" shift;; -sc|--skip-check-restorable) # Flag to check if the image is restorable - chk_img_restoreable="no" + chk_img_restorable="no" shift;; -v|--verbose) verbose="yes"; shift;; -i|--image-size) @@ -778,8 +778,8 @@ check_and_fix_vol_limit_if_required if [ "$mode" = "interactive" ]; then ask_if_check_converted_img else - if [ -z "$chk_img_restoreable" ]; then - chk_img_restoreable="$chk_img_restoreable_def" + if [ -z "$chk_img_restorable" ]; then + chk_img_restorable="$chk_img_restorable_def" fi fi @@ -815,7 +815,7 @@ create-ocs-tmp-img $ocs_tmp_img_opt -n -t $ocsroot "$ocs_src_img_name" "$ocs_des task_convertimage "$ocs_dest_img_name" # -if [ "$chk_img_restoreable" = "yes" ]; then +if [ "$chk_img_restorable" = "yes" ]; then if [ "$nogui" = "on" ]; then nogui_opt="-nogui" fi diff --git a/sbin/ocs-decrypt-img b/sbin/ocs-decrypt-img index 6f6e3c31..918d02f1 100755 --- a/sbin/ocs-decrypt-img +++ b/sbin/ocs-decrypt-img @@ -15,7 +15,7 @@ DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" # Settings verbose="no" -chk_img_restoreable_def="yes" +chk_img_restorable_def="yes" ocs_rm_src_img="no" # @@ -32,7 +32,7 @@ USAGE() { echo "-sc, --skip-check-restorable Skip checking the image if restorable after it is converted." echo "-v, --verbose Prints verbose information" echo "SRC_IMAGE_NAME and DEST_IMAGE_NAME are the image dir name, not absolute path" - echo "If \"ask_user\" is used as SRC_IMAGE_NAME or DEST_IMAGE_NAME, a dialog menu will be shown to allow selection or inputing." + echo "If \"ask_user\" is used as SRC_IMAGE_NAME or DEST_IMAGE_NAME, a dialog menu will be shown to allow selection or inputting." echo "If no SRC_IMAGE_NAME or DEST_IMAGE_NAME is specified, a dialog menu will be shown." echo "Ex:" echo "To decrypt the image \"my-image-enc\", which is located in $ocsroot/ to \"my-image\", run" @@ -53,8 +53,8 @@ ask_if_check_converted_img() { 2> $TMP sc_opt="$(cat $TMP)" case "$sc_opt" in - -sc) chk_img_restoreable="no";; - *) chk_img_restoreable="yes";; + -sc) chk_img_restorable="no";; + *) chk_img_restorable="yes";; esac [ -f "$TMP" ] && rm -f $TMP } # ask_if_check_converted_img @@ -126,12 +126,12 @@ while [ $# -gt 0 ]; do [ -z "$ocsroot" ] && USAGE && exit 1 ;; -nogui|--nogui) - # -nogui is for backward compatable, better to use --nogui + # -nogui is for backward compatibility, better to use --nogui nogui="on" shift;; -sc|--skip-check-restorable) # Flag to check if the image is restorable - chk_img_restoreable="no" + chk_img_restorable="no" shift;; -v|--verbose) verbose="yes"; shift;; -*) echo "${0}: ${1}: invalid option" >&2 @@ -187,8 +187,8 @@ fi if [ "$mode" = "interactive" ]; then ask_if_check_converted_img else - if [ -z "$chk_img_restoreable" ]; then - chk_img_restoreable="$chk_img_restoreable_def" + if [ -z "$chk_img_restorable" ]; then + chk_img_restorable="$chk_img_restorable_def" fi fi @@ -216,7 +216,7 @@ rc="$?" # if [ "$rc" -eq 0 ]; then - if [ "$chk_img_restoreable" = "yes" ]; then + if [ "$chk_img_restorable" = "yes" ]; then if [ "$nogui" = "on" ]; then nogui_opt="-nogui" fi diff --git a/sbin/ocs-encrypt-img b/sbin/ocs-encrypt-img index a7b085cf..67aa60c9 100755 --- a/sbin/ocs-encrypt-img +++ b/sbin/ocs-encrypt-img @@ -15,7 +15,7 @@ DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" # Settings verbose="no" -chk_img_restoreable_def="yes" +chk_img_restorable_def="yes" ocs_rm_src_img="no" # @@ -32,7 +32,7 @@ USAGE() { echo "-sc, --skip-check-restorable Skip checking the image if restorable after it is converted." echo "-v, --verbose Prints verbose information" echo "SRC_IMAGE_NAME and DEST_IMAGE_NAME are the image dir name, not absolute path" - echo "If \"ask_user\" is used as SRC_IMAGE_NAME or DEST_IMAGE_NAME, a dialog menu will be shown to allow selection or inputing." + echo "If \"ask_user\" is used as SRC_IMAGE_NAME or DEST_IMAGE_NAME, a dialog menu will be shown to allow selection or inputting." echo "If no SRC_IMAGE_NAME or DEST_IMAGE_NAME is specified, a dialog menu will be shown." echo "Ex:" echo "To encrypt the image \"my-image\", which is located in $ocsroot/ to \"my-image-enc\", run" @@ -53,8 +53,8 @@ ask_if_check_converted_img() { 2> $TMP sc_opt="$(cat $TMP)" case "$sc_opt" in - -sc) chk_img_restoreable="no";; - *) chk_img_restoreable="yes";; + -sc) chk_img_restorable="no";; + *) chk_img_restorable="yes";; esac [ -f "$TMP" ] && rm -f $TMP } # ask_if_check_converted_img @@ -126,12 +126,12 @@ while [ $# -gt 0 ]; do [ -z "$ocsroot" ] && USAGE && exit 1 ;; -nogui|--nogui) - # -nogui is for backward compatable, better to use --nogui + # -nogui is for backward compatibility, better to use --nogui nogui="on" shift;; -sc|--skip-check-restorable) # Flag to check if the image is restorable - chk_img_restoreable="no" + chk_img_restorable="no" shift;; -v|--verbose) verbose="yes"; shift;; -*) echo "${0}: ${1}: invalid option" >&2 @@ -187,8 +187,8 @@ fi if [ "$mode" = "interactive" ]; then ask_if_check_converted_img else - if [ -z "$chk_img_restoreable" ]; then - chk_img_restoreable="$chk_img_restoreable_def" + if [ -z "$chk_img_restorable" ]; then + chk_img_restorable="$chk_img_restorable_def" fi fi @@ -216,7 +216,7 @@ rc="$?" # if [ "$rc" -eq 0 ]; then - if [ "$chk_img_restoreable" = "yes" ]; then + if [ "$chk_img_restorable" = "yes" ]; then if [ "$nogui" = "on" ]; then nogui_opt="-nogui" fi diff --git a/sbin/ocs-expand-gpt-pt b/sbin/ocs-expand-gpt-pt index 0ea2b1a7..e9a8216e 100755 --- a/sbin/ocs-expand-gpt-pt +++ b/sbin/ocs-expand-gpt-pt @@ -104,7 +104,7 @@ fi # No need to check since we are creating new partition table and should not care about the destination disk. # # Check if MBR disk, if yes, exit -# if `is_mbr_partitition_table_disk $target_disk`; then +# if `is_mbr_partition_table_disk $target_disk`; then # [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE # echo "Disk $target_disk is MBR format. This program only works for GPT format." # [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL @@ -371,7 +371,7 @@ while read dev start start_no size size_no type uuid name attrs; do fi fi if [ "$size_no" -lt 0 ]; then - # append_to_next might be nagtive when "-icds" is enabled and ration is < 1, therefore + # append_to_next might be negative when "-icds" is enabled and ration is < 1, therefore # we have to check the size_no. [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE echo "The calculated size of $dev is < 0!" @@ -412,11 +412,11 @@ last_part="$(LC_ALL=C sfdisk -d $target_disk | grep -Ei "^/dev/" | awk -F":" '{ esp_GUID="$(LC_ALL=C sfdisk -d $target_disk | grep -Ew "^$last_part" | grep -Eio "type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B,")" do_fill_part="yes" if [ -n "$esp_GUID" ]; then - # Found ESP, skip fill the last partitition to the end of disk since it's ESP, might be FAT16, and has small size limit. ChromeOS Flex put ESP in the last one. + # Found ESP, skip fill the last partition to the end of disk since it's ESP, might be FAT16, and has small size limit. ChromeOS Flex put ESP in the last one. do_fill_part="no" fi -# Use parted to fill the last partitition to the end of disk because -# there might be some resudial in the calculation. +# Use parted to fill the last partition to the end of disk because +# there might be some residual in the calculation. # Thanks to Conan for this suggestion. # Ref: https://sourceforge.net/p/clonezilla/discussion/ # Clonezilla_live/thread/c5e92d87/?limit=25#080c diff --git a/sbin/ocs-expand-mbr-pt b/sbin/ocs-expand-mbr-pt index b33227aa..25ff4129 100755 --- a/sbin/ocs-expand-mbr-pt +++ b/sbin/ocs-expand-mbr-pt @@ -104,7 +104,7 @@ fi # No need to check since we are creating new partition table and should not care about the destination disk. # # Check if GPT disk, if yes, exit -# if `is_gpt_partitition_table_disk $target_disk`; then +# if `is_gpt_partition_table_disk $target_disk`; then # [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE # echo "Disk $target_disk is GPT format. This program only works for MBR format." # [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL @@ -313,7 +313,7 @@ while read dev start start_no size size_no id flag; do fi fi if [ "$size_no" -lt 0 ]; then - # append_to_next might be nagtive when "-icds" is enabled and ration is < 1, therefore + # append_to_next might be negative when "-icds" is enabled and ration is < 1, therefore # we have to check the size_no. [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE echo "The calculated size of $dev is < 0!" diff --git a/sbin/ocs-gen-grub2-efi-bldr b/sbin/ocs-gen-grub2-efi-bldr index bd168892..bafcb634 100755 --- a/sbin/ocs-gen-grub2-efi-bldr +++ b/sbin/ocs-gen-grub2-efi-bldr @@ -122,7 +122,7 @@ for i in $grub_arch_all; do for im in $efi_required_mod; do if [ ! -e "$grub_efi_dir/usr/lib/grub/${EFI_ARCH}-efi/${im}.mod" ]; then [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING - echo "Missing grub2 module ${im}.mod... Exluding ${im}.mod..." + echo "Missing grub2 module ${im}.mod... Excluding ${im}.mod..." [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL efi_required_mod="$(echo $efi_required_mod | sed -r -e "s/$im //g")" fi diff --git a/sbin/ocs-get-dev-info b/sbin/ocs-get-dev-info index ed90d90a..4d6c84f5 100755 --- a/sbin/ocs-get-dev-info +++ b/sbin/ocs-get-dev-info @@ -472,7 +472,7 @@ get_size_from_lsblk() { } # end of get_size_from_lsblk # get_type_from_lsblk() { - # This function is intended to get if a parition is swap or extended. + # This function is intended to get if a partition is swap or extended. # Because the mechanism got from parted is too slow, we use lsblk to simulate it. local part_="$1" # e.g. /dev/sda1, /dev/cciss/c0d0p1 local part_type diff --git a/sbin/ocs-img-2-vdk b/sbin/ocs-img-2-vdk index 501d849e..74e90a5c 100755 --- a/sbin/ocs-img-2-vdk +++ b/sbin/ocs-img-2-vdk @@ -8,7 +8,7 @@ # 3. If something goes wrong, how to debug or login kvm to shutdown? # 4. Serial console for grub? # 5. Option to use the booting Clonezilla live as template iso? -# 6. Parsing the image to prepare the MBR or uEFI KVM machine. Now only MBR works, and it's not parsed. +# 6. Parsing the image to prepare the MBR or UEFI KVM machine. Now only MBR works, and it's not parsed. # DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" . $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions @@ -242,7 +242,7 @@ fi # # Use the function download_clonezilla_live in /usr/sbin/drbl-ocs-live-prep -# //NOTE// Must prepare MBR (isolinux.cfg) and uEFI mode (grub.cfg) +# //NOTE// Must prepare MBR (isolinux.cfg) and UEFI mode (grub.cfg) echo $msg_delimiter_star_line if [ "$reuse_i2v_iso" = yes -a -e "$cz_iso" ]; then # Reuse the previous one. @@ -422,7 +422,7 @@ echo "Starting KVM to do the conversion..." # Set kvm pid file kvm_pid_f="$(mktemp /tmp/kvm_pid.XXXXXX)" -# //NOTE// Must separate MBR or uEFI mode from the image +# //NOTE// Must separate MBR or UEFI mode from the image # MBR mode: kvm -name clonezilla -cdrom $cz_iso -m $kvm_ram_size -cpu host -smp $client_cpu_cores -display none -daemonize -pidfile $kvm_pid_f -boot d -chardev file,id=serial0,path=${kvm_serial_log},server,nowait -serial chardev:serial0 -drive file=$ocs_qcow2_img_name,index=0,media=disk,aio=native,cache=none,if=scsi -fsdev local,security_model=mapped,id=fsdev0,path=$ocsroot -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare kvm_job_rc="$?" diff --git a/sbin/ocs-install-grub b/sbin/ocs-install-grub index 60933b14..7a510928 100755 --- a/sbin/ocs-install-grub +++ b/sbin/ocs-install-grub @@ -32,7 +32,7 @@ USAGE() { echo echo "OPTION:" echo "-g, --grub-version VER Assign the grub version as VER (1 or 2)" - echo "-s, --selected-hd DISk Assign the disk to search for _only_, i.e. not to search those not in the lists. This is used for not to touch those disk which are not restored. It can be with or without /dev/, e.g, /dev/sda or sda." + echo "-s, --selected-hd DISK Assign the disk to search for _only_, i.e. not to search those not in the lists. This is used for not to touch those disk which are not restored. It can be with or without /dev/, e.g, /dev/sda or sda." echo "-p, --selected-parts PARTITION Assign the partitions to search for _only_, i.e. not to search those not in the lists. This is used for not to touch those partitions which are not restored. It can be with or without /dev/, e.g., /dev/sda1 or sda For multiple partitions, use something like \"sda1 sda2\"" echo "-n, --no-check-before-install By default we check if grub is already in the boot loader. If so, we continue to run grub-install. This option will go without checking." echo "Ex:" @@ -124,7 +124,7 @@ do_run_grub1_from_running_os() { echo "Running: $grub_install_exec $grub_no_floopy_opt --root-directory=$hd_img /dev/$boot_loader_pos" $grub_install_exec $grub_no_floopy_opt --root-directory=$hd_img /dev/$boot_loader_pos rc="$?" - # Remove the device.map in case it provents the restored OS fails to run update-grub due to different boot device name (e.g. sda <-> hda issue) + # Remove the device.map in case it prevents the restored OS fails to run update-grub due to different boot device name (e.g. sda <-> hda issue) [ -f "$hd_img/boot/grub/device.map" ] && rm -f $hd_img/boot/grub/device.map check_grub1_config_file $hd_img @@ -236,7 +236,7 @@ show_grub1_ext4_warning () { [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL return 3 else - # Otherwise distributios... + # Otherwise distributions... [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "Warning! Found grub partition ($grub_pt_) file system is ext4! Not all versions of grub 1 supports file system ext4!" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL @@ -402,7 +402,7 @@ fdisk -l /dev/$grub_hd &>/dev/null # This ocs-install-grub program is only for BIOS/MBR boot loader, # not for EFI unless it's a GPT disk with a special "bios_boot" partition # exists in the machine using legacy BIOS. -if ! `is_mbr_partitition_table_disk /dev/$grub_hd`; then +if ! `is_mbr_partition_table_disk /dev/$grub_hd`; then # In this case, it might be GPT or some other non MBR (msdos) case. if `is_gpt_disk_with_bios_boot_part_in_legacy_bios /dev/$grub_hd`; then # This is the case for a GPT disk with a special "bios_boot" partition @@ -445,7 +445,7 @@ if [ "$check_before_install" = "yes" ]; then # fSfSfUfh # Invalid partition table # Error loading operating system - # Missing operating system <----- commone one + # Missing operating system <----- common one # ====================== # (2) Instead, the grub boot loader is on root partition (/dev/sda2) for OpenSuSE 13.2 default installation # root@debian:/tmp# dd if=/dev/sda2 bs=512 count=1 2>/dev/null |strings @@ -513,7 +513,7 @@ if [ -n "$($grub_install_exec --help | grep "\--no-floppy")" ]; then grub_no_floopy_opt="--no-floppy" fi # Check if /boot is in its own partition, if so, different mount point. -# grub root-directory must have "/boot/". If no "/boot/", it must be the grub partition itself (i.e. a separate partition will be mounted as /boot, and it conains /grub/ in the partition.) +# grub root-directory must have "/boot/". If no "/boot/", it must be the grub partition itself (i.e. a separate partition will be mounted as /boot, and it contains /grub/ in the partition.) if [ ! -d "$hd_img/boot/" ]; then # In this case, /boot must exist in its own partition, # not same partition with / (root partition). @@ -524,7 +524,7 @@ if [ ! -d "$hd_img/boot/" ]; then echo "There is a separate boot partition in target device. Trying to mount root partition for $grub_install_exec to work with that..." [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL # Important! We have to mount the root dir first. Otherwise in FC6, CentOS 5 or later, grub-install will refuse to do that without root device. It will show the error message like: "Could not find device for /mnt"... For Debian or Ubuntu, no such problem. - # Actually we can modify /sbin/grub-install (grub-0.97-13) in FC6 or Centos5: + # Actually we can modify /sbin/grub-install (grub-0.97-13) in FC6 or CentOS 5: # ----------- # ... # # Get the root drive. diff --git a/sbin/ocs-iso b/sbin/ocs-iso index 2f959a99..661e9fdb 100755 --- a/sbin/ocs-iso +++ b/sbin/ocs-iso @@ -14,7 +14,7 @@ DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" # If insert_mode=prog_only, only copy DRBL/Clonezilla programs only, no ocs images. insert_mode="prog_and_img" img_size_sum=0 -# Default to output the result to iso file, another vaule is cdwriter. +# Default to output the result to iso file, another value is cdwriter. output_mode="file" # If there is any file larger then 2GB, we need to turn on -allow-limited-size option for genisoimage. Actually it can be 4GB. Anyway, here we use 2GB. (man genisoimage for more details) iso9660_file_size_limit="2000M" # For command "find" to find the file size (unit: Bytes) @@ -69,7 +69,7 @@ USAGE() { echo "-u, --include-dir DIR Include a dir in the target iso file." echo "-x, --extra-boot-param EXTRA_PARAM Assign extra boot parameter EXTRA_PARAM for clonezilla live kernel to read. These parameters are the same with that from live-boot or live-config. Ex. \"noeject\" can be use to not prompt to eject the CD on reboot." echo "-y, --syslinux-ver VER Assign the syslinux version as VER. E.g. 6.02, 6.03-pre1" - echo "$prog will download a template Debian live CD for clonezilla iso file if ncecessary. You can also download it by yourself, and put it in the working directory when you run $prog. If you want to create that template iso file in Debian Etch, run create-debian-live." + echo "$prog will download a template Debian live CD for clonezilla iso file if necessary. You can also download it by yourself, and put it in the working directory when you run $prog. If you want to create that template iso file in Debian Etch, run create-debian-live." echo "NOTE! Due to the limitation in mkisofs, this program does not work in clonezilla image file larger than $FILE_LIMIT MB." echo "Ex:" echo "To put clonezilla image squeeze-ocs (located in /home/partimag in clonezilla server) to Live CD, you can run:" @@ -113,7 +113,7 @@ check_file_size_in_ocs_image() { # clean_tmp_dir() { if [ -d "$DEBIAN_ISO_TMP" -a -n "$DEBIAN_ISO_TMP" ]; then - # Force to unmount, althouth it might have beed unmounted, or maybe not (ctrl-c interrupt). + # Force to unmount, although it might have been unmounted, or maybe not (ctrl-c interrupt). umount $DEBIAN_ISO_TMP &>/dev/null rmdir $DEBIAN_ISO_TMP &>/dev/null fi @@ -328,7 +328,7 @@ fi if [ "$output_mode" = "cdwriter" -a type wodim &>/dev/null ]; then [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE - echo "Program wodim is not aviailable! You have to install it." + echo "Program wodim is not available! You have to install it." [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL echo "$msg_program_stop" exit 1 @@ -394,8 +394,8 @@ if [ "$template_mode" = "from-downloaded-live-media" ]; then cz_ver="$(LC_ALL=C get-latest-ocs-live-ver $clonezilla_iso_branch)" clonezilla_iso_fname="clonezilla-live-${cz_ver}${clonezilla_iso_arch_tag}.iso" iso_url_for_pxe_ocs_live="http://downloads.sourceforge.net/clonezilla/$clonezilla_iso_fname" - echo "We need Clonnezilla live iso to create such a recovery cd." - echo "Downloadling the iso file from $iso_url_for_pxe_ocs_live..." + echo "We need Clonezilla live iso to create such a recovery cd." + echo "Downloading the iso file from $iso_url_for_pxe_ocs_live..." wget $iso_url_for_pxe_ocs_live get_iso_rc=$? # validate it @@ -432,7 +432,7 @@ if [ "$insert_mode" = "prog_and_img" ]; then # (1) normal_menu_with_insert_image=no, i.e. only restore menu. ocs-live-restore is the main program. # If it's not batch mode for clonezilla live (especially for restoring), by default we have to append "-x --restore-only", and especially before any other parameters, so that ocs-sr will run like: # ocs-sr -l $ocs_lang -p true -x --restore-only -b restoredisk squeeze_image - # (2) normal_menu_with_insert_image=yes, i.e. normal menu. ocs-live-general is the main program. Threfore no extra param. + # (2) normal_menu_with_insert_image=yes, i.e. normal menu. ocs-live-general is the main program. Therefore no extra param. if [ "$ocs_live_batch" = "no" ]; then case "$normal_menu_with_insert_image" in no) ocs_live_extra_param="-x --restore-only $ocs_live_extra_param" ;; @@ -693,7 +693,7 @@ if [ "$live_efi_boot_loader" = "grub" ]; then else [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "Warning! Missing /EFI/boot/bootia32.efi, /EFI/boot/bootx64.efi, /EFI/boot/bootaa64.efi or /EFI/boot/bootarm.efi in the template iso!" - echo "uEFI booting won't work!" + echo "UEFI booting won't work!" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL fi elif [ "$live_efi_boot_loader" = "syslinux" ]; then diff --git a/sbin/ocs-iso-2-onie b/sbin/ocs-iso-2-onie index d7862948..cbd0f7d3 100755 --- a/sbin/ocs-iso-2-onie +++ b/sbin/ocs-iso-2-onie @@ -224,7 +224,7 @@ if [ "$rc" -gt 0 ]; then exit 1 fi -echo "Uncompresing $EXTRACTDIR/live/initrd.img... " +echo "Decompressing $EXTRACTDIR/live/initrd.img... " ## pack ISO into initrd # create initrd working dir INITDIR=${WORKDIR}/initrd-extract @@ -260,11 +260,11 @@ case $(file --brief --mime --dereference $EXTRACTDIR/live/initrd.img | \ esac $UNCOMPRESS $EXTRACTDIR/live/initrd.img | cpio -d -i -m -echo "Copying inputed iso into initrd... " -# copy inputed iso into initrd +echo "Copying entered iso into initrd... " +# copy entered iso into initrd rsync -aL --info=progress2 "${CURDIR}/${IMAGE}" ./conf/live.iso -echo "Repacking inputed iso into initrd... " +echo "Repacking entered iso into initrd... " # repack find . | cpio -o -H newc | $COMPRESS > ${WORKDIR}/initrd.img # cd back into root dir diff --git a/sbin/ocs-lang-kbd-conf b/sbin/ocs-lang-kbd-conf index a97676ea..703b305d 100755 --- a/sbin/ocs-lang-kbd-conf +++ b/sbin/ocs-lang-kbd-conf @@ -59,7 +59,7 @@ if [ -z "$live_keyboard_layouts" ]; then # Bterm/jfbterm can only be used (it's better since Asian fonts can be shown) when: # (1) If bterm and uni fonts or jfbterm are available # (2) If it's not in serial console - # (3) frambebuffer device exists + # (3) framebuffer device exists # (4) CPU arch is x86/x86-64 since jfbterm does not work on aarch64. if [ -n "$fb_term" ] && \ [ -z "$(grep -E "console=.*ttyS.*" /proc/cmdline)" ] && \ @@ -81,7 +81,7 @@ if [ -z "$live_keyboard_layouts" ]; then ;; esac else - # ocs-langkbdconf-bterm does keyboard config and language config. Here we have do the same 2 jobs. Otherwise locales will be empty and a lot of warnings will be shown when ruuning commands. + # ocs-langkbdconf-bterm does keyboard config and language config. Here we have do the same 2 jobs. Otherwise locales will be empty and a lot of warnings will be shown when running commands. force_TERM_as_linux_if_necessary # (1) language [ -z "$ocs_lang" ] && ocs_lang=en_US.UTF-8 @@ -99,7 +99,7 @@ if [ -z "$live_keyboard_layouts" ]; then fi # Here we disable setting the system locale, since most of the cases, e.g. for Chinese, the terminal won't show the characters, unless it's in bterm/jfbterm. -# Varialble ocs_lang will be created in ocs-langkbdconf-bterm, and write to /etc/ocs/ocs-live.conf. +# Variable ocs_lang will be created in ocs-langkbdconf-bterm, and write to /etc/ocs/ocs-live.conf. # Load ocs_lang if it exists #[ -e /etc/ocs/ocs-live.conf ] && . /etc/ocs/ocs-live.conf #if [ -n "${ocs_lang}" ]; then diff --git a/sbin/ocs-live b/sbin/ocs-live index c74fc96b..fc1569bb 100755 --- a/sbin/ocs-live +++ b/sbin/ocs-live @@ -19,7 +19,7 @@ USAGE() { echo "$ocs [OPTION]" echo " Options:" language_help_prompt_by_idx_no - echo " -p, --postaction [choose|poweroff|reboot|command|CMD] When save/restoration finishs, choose action in the client, poweroff, reboot (default), in command prompt or run CMD" + echo " -p, --postaction [choose|poweroff|reboot|command|CMD] When save/restoration finishes, choose action in the client, poweroff, reboot (default), in command prompt or run CMD" echo " -s, --skip-ocs-prep-repo Skip preparing the clonezilla image home directory (assume it's ready)." } # diff --git a/sbin/ocs-live-boot-menu b/sbin/ocs-live-boot-menu index b7046f10..03a1a70d 100755 --- a/sbin/ocs-live-boot-menu +++ b/sbin/ocs-live-boot-menu @@ -50,11 +50,11 @@ USAGE() { echo "-c, --toram-mode MODE Assign the mode for \"To RAM\" boot menu. Available modes are \"compact\", \"live\" and \"all\". \"compact\" will copy filesystem.squashfs only, \"live\" will copy the directory \"live\", and \"all\" will copy all the files in the live partition to RAM." echo "-d, --dark-bg Assign the dark background. The prompt text will use be the brighter on. By default we use lighter background." echo "-f, --framebuffer-mode VGA_MODE Assign the framebuffer mode as VGA_MODE, for example, 788 is resolution 800x600 with 16 bpp." - echo "-k, --kernel-file FILENAME Provide the kernel name, which wiil be used in the menu.lst or syslinux.cfg. If unset, $KERNEL_FILE_DEFAULT will be used" - echo "-i, --initrd-file FILENAME Provide the initrd name, which wiil be used in the menu.lst or syslinux.cfg. If unset, $INITRD_FILE_DEFAULT will be used" + echo "-k, --kernel-file FILENAME Provide the kernel name, which will be used in the menu.lst or syslinux.cfg. If unset, $KERNEL_FILE_DEFAULT will be used" + echo "-i, --initrd-file FILENAME Provide the initrd name, which will be used in the menu.lst or syslinux.cfg. If unset, $INITRD_FILE_DEFAULT will be used" echo "-j, --enable-speech Enable the boot menu for speech synthesis" echo "-n, --version-no VER_no Provide the version number to be shown in the syslinux/isolinux boot menu." - echo "-p, --boot-param PARAM Provide the append strings for kernel bootparam. which wiil be used in the menu.lst or syslinux.cfg. If unset, $BOOT_PARAM_DEFAULT will be used. Note! For clonezilla live (based on Debian Live), boot=casper or boot=live is a must, so do not forget to include it." + echo "-p, --boot-param PARAM Provide the append strings for kernel bootparam, which will be used in the menu.lst or syslinux.cfg. If unset, $BOOT_PARAM_DEFAULT will be used. Note! For clonezilla live (based on Debian Live), boot=casper or boot=live is a must, so do not forget to include it." echo "-g1, grub-hd-dev DEV Assign grub root device DEV (Ex: hd0)" echo "-g2, grub-part-no NO Assign grub root partition number index NO (Ex: 0)" echo "-g3, OS-root-dev ROOTDEV Assign ROOTDEV which grub will pass as boot param (Ex. /dev/sda1)" @@ -92,7 +92,7 @@ prompt 0 noescape 1 MENU MARGIN 5 $mask MENU BACKGROUND $bg_img -# Set the color for unselected menu item and timout message +# Set the color for unselected menu item and timeout message BOOT_MENU_END if [ "$background_mode" = "dark" ]; then @@ -313,7 +313,7 @@ label $output_title ($lang_locale. To RAM) kernel $kernel_file append initrd=$initrd_file $boot_param $vga_default_mode locale=$lang_locale $toram_opt ip= net.ifnames=0 $quiet_opt $splash_opt $vga_blacklist_opt TEXT HELP - $lang_locale, and alll the programs will be copied to RAM, + $lang_locale, and all the programs will be copied to RAM, so you can remove boot media (CD or USB flash drive) later ENDTEXT @@ -429,7 +429,7 @@ label etherboot # MENU PASSWD kernel $sys_files_dir/eb.zli TEXT HELP - Run Etherbot to enable network (PXE) boot + Run Etherboot to enable network (PXE) boot ENDTEXT BOOT_MENU_END @@ -479,7 +479,7 @@ cat <<-BOOT_MENU_END > $output_file # set pref=/boot/grub set default="0" -# For grub 2.04, a workaround to avoid boot failure is to add "rmmod tpm": https://bugs.debian.org/975835. However, it might fail in secure boot uEFI machine, and the error is like: +# For grub 2.04, a workaround to avoid boot failure is to add "rmmod tpm": https://bugs.debian.org/975835. However, it might fail in secure boot UEFI machine, and the error is like: # error: verification requested but nobody cares: /live/vmlinuz. # Out of range pointer 0x3000000004040 # Aborted. Press any key to exit. @@ -679,8 +679,8 @@ menuentry "Local operating system (if available)" --id local-disk { echo "Booting first local disk..." # Generate boot menu automatically configfile /boot/grub/boot-local-efi.cfg - # If not chainloaded, definitely no uEFI boot loader was found. - echo "No uEFI boot loader was found!" + # If not chainloaded, definitely no UEFI boot loader was found. + echo "No UEFI boot loader was found!" sleep 15 } @@ -735,8 +735,8 @@ BOOT_MENU_END fi # cat <<-BOOT_MENU_END >> $output_file -menuentry 'uEFI firmware setup' 'uefi-firmware' { - echo "Entering uEFI firmware setup..." +menuentry 'UEFI firmware setup' 'uefi-firmware' { + echo "Entering UEFI firmware setup..." fwsetup } @@ -973,7 +973,7 @@ fi # 2016/03/30 Use $boot_param directly instead of $boot_param_toram_extra # 2014/01/10 No need to add "noeject" here. "toram" for live-boot will handle that. # Thanks to Ady for the bug report. -## boot_param_toram_extra is specially for "To RAM" menu. We will append noeject if it does not containt that. +## boot_param_toram_extra is specially for "To RAM" menu. We will append noeject if it does not contains that. #if [ -z "$(echo $boot_param | grep -Ew "noeject")" ]; then # boot_param_toram_extra="$boot_param noeject" #else diff --git a/sbin/ocs-live-bug-report b/sbin/ocs-live-bug-report index 28ad61a0..a878656a 100755 --- a/sbin/ocs-live-bug-report +++ b/sbin/ocs-live-bug-report @@ -1,7 +1,7 @@ #!/bin/bash # This program is used on Clonezilla live to collect some disk info for bug or problem report. -# Load DRBL/Clonezill setting and functions +# Load DRBL/Clonezilla setting and functions DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" . $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions diff --git a/sbin/ocs-live-dev b/sbin/ocs-live-dev index 083f87e4..603764d0 100755 --- a/sbin/ocs-live-dev +++ b/sbin/ocs-live-dev @@ -77,7 +77,7 @@ USAGE() { echo "-x, --extra-boot-param EXTRA_PARAM Assign extra boot parameter EXTRA_PARAM for clonezilla live kernel to read. These parameters are the same with that from live-boot or live-config. Ex. \"noeject\" can be use to not prompt to eject the CD on reboot." echo "-y, --syslinux-ver VER Assign the syslinux version as VER. E.g. 6.02, 6.03-pre1" echo "-z, --prefer-archive PROG Assign the archive program as PROG (tar or zip). Default program is $prefer_archive." - echo "$prog will download a template Debian live CD for clonezilla iso file if ncecessary. You can also download it by yourself, and put it in the working directory when you run $prog. If you want to create that template iso file in Debian Etch, run create-debian-live." + echo "$prog will download a template Debian live CD for clonezilla iso file if necessary. You can also download it by yourself, and put it in the working directory when you run $prog. If you want to create that template iso file in Debian Etch, run create-debian-live." echo "NOTE! You have to prepare the target partition first, and the filesystem should be ready (FAT or ext2/3)." echo "Ex:" echo "To put clonezilla image squeeze-ocs (located in /home/partimag in clonezilla server) to USB device /dev/sdg1, you can run:" @@ -98,7 +98,7 @@ USAGE() { # clean_tmp_dir() { if [ -d "$DEBIAN_ISO_TMP" -a -n "$DEBIAN_ISO_TMP" ]; then - # Force to unmount, althouth it might have beed unmounted, or maybe not (ctrl-c interrupt). + # Force to unmount, although it might have been unmounted, or maybe not (ctrl-c interrupt). umount $DEBIAN_ISO_TMP &>/dev/null rmdir $DEBIAN_ISO_TMP &>/dev/null fi @@ -456,8 +456,8 @@ if [ "$template_mode" = "from-downloaded-live-media" ]; then cz_ver="$(LC_ALL=C get-latest-ocs-live-ver $clonezilla_iso_branch)" clonezilla_iso_fname="clonezilla-live-${cz_ver}${clonezilla_iso_arch_tag}.iso" iso_url_for_pxe_ocs_live="http://downloads.sourceforge.net/clonezilla/$clonezilla_iso_fname" - echo "We need Clonnezilla live iso to create such a recovery cd." - echo "Downloadling the iso file from $iso_url_for_pxe_ocs_live..." + echo "We need Clonezilla live iso to create such a recovery cd." + echo "Downloading the iso file from $iso_url_for_pxe_ocs_live..." wget $iso_url_for_pxe_ocs_live get_iso_rc=$? # validate it @@ -493,7 +493,7 @@ if [ "$insert_mode" = "prog_and_img" ]; then # (1) normal_menu_with_insert_image=no, i.e. only restore menu. ocs-live-restore is the main program. # If it's not batch mode for clonezilla live (especially for restoring), by default we have to append "-x --restore-only", and especially before any other parameters, so that ocs-sr will run like: # ocs-sr -l $ocs_lang -p true -x --restore-only -b restoredisk squeeze_image - # (2) normal_menu_with_insert_image=yes, i.e. normal menu. ocs-live-general is the main program. Threfore no extra param. + # (2) normal_menu_with_insert_image=yes, i.e. normal menu. ocs-live-general is the main program. Therefore no extra param. if [ "$ocs_live_batch" = "no" ]; then case "$normal_menu_with_insert_image" in no) ocs_live_extra_param="-x --restore-only $ocs_live_extra_param" ;; @@ -737,7 +737,7 @@ if [ "$live_efi_boot_loader" = "grub" ]; then else [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "Warning! Missing /EFI/boot/bootia32.efi, /EFI/boot/bootx64.efi, /EFI/boot/bootaa64.efi or /EFI/boot/bootarm.efi in the template iso!" - echo "uEFI booting won't work!" + echo "UEFI booting won't work!" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL fi elif [ "$live_efi_boot_loader" = "syslinux" ]; then @@ -879,7 +879,7 @@ if [ -n "$ocs_image" ]; then echo -n "Copying clonezilla image to working dir... " for im in $ocs_image; do echo -n "$im " - # we just copy images to $ocsroot in usb debice. since $ocsroot in drbl.conf will be read when ocs-live-save-*/ocs-live-restore is run + # we just copy images to $ocsroot in usb device. since $ocsroot in drbl.conf will be read when ocs-live-save-*/ocs-live-restore is run # If the file system of $USB_TMP/$ocsroot/ supports link, we will link the image, and when zip or tar, follow the link. Actually zip will follow the link automatically since it does not support archiving link file. For tar we have to use option "h". case "$img_cp_type" in copy) @@ -1073,7 +1073,7 @@ if [ "$target_mode" = "boot_dev" ]; then sleep 1 umount $USB_TMP else - # just store it. since big files, like squash flie and opt_drbl.tgz are compressed, it's not necessary to compress it again. + # just store it. since big files, like squash file and opt_drbl.tgz are compressed, it's not necessary to compress it again. # Before packing it, make sure all the modes are writable so that the uncompressed files can be removed easily with rm -rf. chmod -R u+w $USB_TMP (cd $USB_TMP diff --git a/sbin/ocs-live-feed-img b/sbin/ocs-live-feed-img index 58c76384..67ae697b 100755 --- a/sbin/ocs-live-feed-img +++ b/sbin/ocs-live-feed-img @@ -30,15 +30,15 @@ create_part="yes" restore_mbr="yes" restore_prebuild_mbr="no" rm_win_swap_hib="no" -chk_img_restoreable_on_srv_def="yes" -# Timeout (secs) for wating udp-sender & BT program +chk_img_restorable_on_srv_def="yes" +# Timeout (secs) for waiting udp-sender & BT program timeout_max="60" # Network settings for closed LAN ipadd_closed_lan="192.168.169.250" netmask_closed_lan="24" gwadd_closed_lan="192.168.169.254" ocs_sr_mode="" -bt_raw_dev_psuedo_img_prefix="btraw-psdo" +bt_raw_dev_pseudo_img_prefix="btraw-psdo" check_ocs_live="yes" # Functions @@ -233,7 +233,7 @@ parse_ocs_live_feed_img_cmd_options_with_dash() { OCS_OPT="$OCS_OPT -v" shift; n_shift=$((n_shift+1));; -nogui|--nogui) - # -nogui is for backward compatable, better to use --nogui + # -nogui is for backward compatibility, better to use --nogui OCS_OPT="$OCS_OPT --nogui" shift; n_shift=$((n_shift+1));; -rm-win-swap-hib|--rm-win-swap-hib) @@ -288,7 +288,7 @@ parse_ocs_live_feed_img_cmd_options_with_dash() { udp_sender_extra_opt="$udp_sender_extra_opt --broadcast" shift; n_shift=$((n_shift+1));; -j|--create-part-by-sfdisk) - # We leave this option for backward compatability. + # We leave this option for backward compatibility. OCS_OPT="$OCS_OPT --create-part-by-sfdisk" shift; n_shift=$((n_shift+1));; -j0|--create-part-by-dd) @@ -344,7 +344,7 @@ parse_ocs_live_feed_img_cmd_options_with_dash() { OCS_OPT="$OCS_OPT -hn1 $win_hostname_prefix" ;; -o|-o1|--run-postrun-dir) - # -o is for backward compatability + # -o is for backward compatibility run_postrun_dir="yes" OCS_OPT="$OCS_OPT --run-postrun-dir" shift; n_shift=$((n_shift+1));; @@ -399,16 +399,16 @@ parse_ocs_live_feed_img_cmd_options_with_dash() { shift; n_shift=$((n_shift+1));; -sc0|--skip-check-restorable-on-srv) # flag to check if the image is restorable on clonezilla server - chk_img_restoreable_on_srv="no" + chk_img_restorable_on_srv="no" shift; n_shift=$((n_shift+1));; -sc|-scs|--skip-check-restorable|--skip-check-restorable-s) # flag to check if the image is restorable - chk_img_restoreable_mod_save="no" + chk_img_restorable_mod_save="no" OCS_OPT="$OCS_OPT -scs" shift; n_shift=$((n_shift+1));; -scr|--skip-check-restorable-r) # Flag to check if the image is restorable - chk_img_restoreable_mod_restore="no" + chk_img_restorable_mod_restore="no" OCS_OPT="$OCS_OPT -scr" shift; n_shift=$((n_shift+1));; -md|--massive-deploy-mode) @@ -573,7 +573,7 @@ gen_ocs_live_netboot_conf() { grub_menu_to_reveal="clonezilla-live-client local-disk" generate-pxe-menu - # A workaround to fix the dnsmasq issue for uEFI network boot clients (actually grub should be patched) + # A workaround to fix the dnsmasq issue for UEFI network boot clients (actually grub should be patched) # i.e., we have to assign the tftp server IP address in grub network boot loader. # This is only necessary when dnsmasq is used to relay the DHCP request from clients to existing DHCP service # Now this only works for non-secure-boot clients. @@ -638,7 +638,7 @@ gen_ocs_live_netboot_conf() { client_kb_options="$XKBOPTIONS" fi if [ -z "$client_kb_layout" ]; then - # If no keybouard layout is found, set it as that + # If no keyboard layout is found, set it as that # is assigned in drbl-ocs.conf, force to update it. client_kb_layout="$ocs_live_keymap_for_pxe_ocs_live" # For the rest (model, variant or options they might be nothing. @@ -926,7 +926,7 @@ task_start_feed_img_for_cast() { fi else [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING - echo "Program ocs-bttrack was not found. Only massive deploymnet from image is available." + echo "Program ocs-bttrack was not found. Only massive deployment from image is available." md_source_type="from-image" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL fi @@ -1095,7 +1095,7 @@ task_start_feed_img_for_cast() { # cast_dev_action is required for function start_ocs_service # while target_hd or target_parts is required for function # multicast|bt_restoredisk and multicast|bt_restoreparts (hence for start_ocs_service) - # For BT mode, bt_dev_type is assigned. For multicast/broadcst mode, not yet? + # For BT mode, bt_dev_type is assigned. For multicast/broadcast mode, not yet? cast_dev_action="restoredisk" get_not_busy_disks_or_parts harddisk "" "" # we will get dev_list target_hd="" @@ -1128,7 +1128,7 @@ task_start_feed_img_for_cast() { # cast_dev_action is required for function start_ocs_service # while target_hd or target_parts is required for function # multicast|bt_restoredisk and multicast|bt_restoreparts (hence for start_ocs_service) - # For BT mode, bt_dev_type is assigned. For multicast/broadcst mode, not yet? + # For BT mode, bt_dev_type is assigned. For multicast/broadcast mode, not yet? case "$bt_dev_type" in "disk-2-mdisks") cast_dev_action="restoredisk" target_hd="$ocs_restore_dev" @@ -1174,8 +1174,8 @@ task_start_feed_img_for_cast() { fi fi # Load default settings if not assigned - if [ -z "$chk_img_restoreable_on_srv" ]; then - chk_img_restoreable_on_srv="$chk_img_restoreable_on_srv_def" + if [ -z "$chk_img_restorable_on_srv" ]; then + chk_img_restorable_on_srv="$chk_img_restorable_on_srv_def" fi ;; from-device) @@ -1214,7 +1214,7 @@ task_start_feed_img_for_cast() { OCS_PARAM_TMP=`mktemp /tmp/ocs_param_tmp.XXXXXX` trap "[ -f "$OCS_PARAM_TMP" ] && rm -f $OCS_PARAM_TMP" HUP INT QUIT TERM EXIT # The pseudo image is not restorable. Only some files about partition table and boot loader. Therefore skip check it. - chk_img_restoreable_on_srv="-sc0" + chk_img_restorable_on_srv="-sc0" set_drbl_ocs_extra_param -s -p reboot restore $dev_type # OCS_OPT_PRE is for ocs-live-feed-img, we have to convert to that for ocs-sr ocs_opt_dia="$(cat $OCS_PARAM_TMP)" @@ -1304,7 +1304,7 @@ task_start_feed_img_for_cast() { # Before really starting the feeding service, we can check if the image integrity is OK or not. # If the image is checked on the server, then we force to skip image checking on the clients when restoring. - if [ -d "$imagedir/$target_dir" -a "$chk_img_restoreable_on_srv" = "yes" ]; then + if [ -d "$imagedir/$target_dir" -a "$chk_img_restorable_on_srv" = "yes" ]; then echo $msg_delimiter_star_line check_image_if_restorable -i "$target_dir" "$imagedir" rc_chkimg="$?" @@ -1321,7 +1321,7 @@ task_start_feed_img_for_cast() { if [ -n "$mdst_img" -a -d "$imagedir/$mdst_img" ]; then target_dir="$mdst_img" else - target_dir="${bt_raw_dev_psuedo_img_prefix}-$(LC_ALL=C date +%Y%m%d-%H%M%S)" + target_dir="${bt_raw_dev_pseudo_img_prefix}-$(LC_ALL=C date +%Y%m%d-%H%M%S)" if [ -d "$ocsroot/${target_dir}" ]; then mv $imagedir/${target_dir} $imagedir/${target_dir}-saved fi @@ -1399,7 +1399,7 @@ task_start_feed_img_for_cast() { echo $msg_delimiter_star_line | tee -a ${OCS_LOGFILE} ps -www -C "cat" -C "udp-sender" -o pid,cmd | tee -a ${OCS_LOGFILE} echo $msg_delimiter_star_line | tee -a ${OCS_LOGFILE} - echo "More udp-sender and cat comamnds (if available) will be spawned when the 1st one is done." | tee -a ${OCS_LOGFILE} + echo "More udp-sender and cat commands (if available) will be spawned when the 1st one is done." | tee -a ${OCS_LOGFILE} fi # if [ "$castmode" = "bt" ]; then @@ -1514,7 +1514,7 @@ CLIENT_END # case "$ocs_litesrv_netmode" in - "use-existing-dhcpd"|"start-new-dhcpd") always_restore="no" ;; # So that ocsmgrd will update PXE/Grub NB confi + "use-existing-dhcpd"|"start-new-dhcpd") always_restore="no" ;; # So that ocsmgrd will update PXE/Grub NB config "no-dhcpd") always_restore="yes" ;; # So that ocsmgrd won't update PXE/Grub NB config esac start_ocsmgrd_daemon @@ -1522,7 +1522,7 @@ CLIENT_END elif [ "$ls_client_mode" = "interactive-client" ]; then # Interactive mode for clients. echo "Starting network booting mechanism for clients to enter Clonezilla live interactive mode..." - # cast_srv_ip is required for generating uEFI netboot, a workaround for tftp to fix the dnsmasq issue for uEFI network boot clients. Check "drbl-gen-grub-efi-nb -t $cast_srv_ip" in function gen_ocs_live_netboot_conf + # cast_srv_ip is required for generating UEFI netboot, a workaround for tftp to fix the dnsmasq issue for UEFI network boot clients. Check "drbl-gen-grub-efi-nb -t $cast_srv_ip" in function gen_ocs_live_netboot_conf get_cast_srv_ip else echo "Unknown mode for ls_client_mode: $ls_client_mode" @@ -1546,7 +1546,7 @@ CLIENT_END "use-existing-dhcpd"|"start-new-dhcpd") # Check the file permission mode of squashfs, we need that for later use squashfs_fmode="$(LC_ALL=C stat -c %a $LIVE_MEDIA/live/filesystem.squashfs | cut -c 3)" - # Not matter if clients use netboot or not, we start the required services and prepare the PXE and uEFI network boot + # No matter if clients use netboot or not, we start the required services and prepare the PXE and UEFI network boot systemctl stop dnsmasq systemctl start dnsmasq start_nat_service @@ -1580,7 +1580,7 @@ CLIENT_END case "$ocs_litesrv_netmode" in "use-existing-dhcpd"|"start-new-dhcpd") echo "$msg_turn_on_client_to_clone" - echo "$msg_if_boot_from_locaL_media:" + echo "$msg_if_boot_from_local_media:" ;; esac echo "$msg_boot_client_with_same_version_clonezilla_live: $cast_srv_ip" | tee -a ${OCS_LOGFILE} @@ -1704,7 +1704,7 @@ fi echo $msg_delimiter_star_line if [ "$verbose" = "on" ]; then - # The default output for udpcast stderr is surpressed, now turn it on + # The default output for udpcast stderr is suppressed, now turn it on udpcast_stderr="/dev/stderr" fi diff --git a/sbin/ocs-live-final-action b/sbin/ocs-live-final-action index 4a1ff406..4400ab94 100755 --- a/sbin/ocs-live-final-action +++ b/sbin/ocs-live-final-action @@ -1,7 +1,7 @@ #!/bin/bash # Author: Steven Shiau # License: GPL -# //NOTE// Do not put poweroff/reboot in this program since it's run in jfbterm/bterm. We separate the final action from ocs-live-final-action. Otherwise if the poweroff command run in jfbterm/bterm, the Debian live "Press Enter" message after poweroff/shutdown command is issued might be coverd by jfbterm/bterm and user will not have any idea what's happening after choose poweroff/reboot. +# //NOTE// Do not put poweroff/reboot in this program since it's run in jfbterm/bterm. We separate the final action from ocs-live-final-action. Otherwise if the poweroff command run in jfbterm/bterm, the Debian live "Press Enter" message after poweroff/shutdown command is issued might be covered by jfbterm/bterm and user will not have any idea what's happening after choose poweroff/reboot. # We need to know ocsroot. DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" @@ -88,7 +88,7 @@ ask_final_action() { } # end of ask_final_action # do_ocs_live_run_final() { - # //NOTE// Do not put poweroff/reboot in this program since it's run in jfbterm/bterm. We separate the final action from ocs-live-final-action. Otherwise if the poweroff command run in jfbterm/bterm, the Debian live "Press Enter to continue" message after poweroff/shutdown command is issued might be coverd by jfbterm/bterm and user will not have any idea what's happening after choose poweroff/reboot. + # //NOTE// Do not put poweroff/reboot in this program since it's run in jfbterm/bterm. We separate the final action from ocs-live-final-action. Otherwise if the poweroff command run in jfbterm/bterm, the Debian live "Press Enter to continue" message after poweroff/shutdown command is issued might be covered by jfbterm/bterm and user will not have any idea what's happening after choose poweroff/reboot. [ -n "$final_action" ] && echo "The next step: $final_action" case "$final_action" in poweroff) unmount_mounted_fs_before_ocs_live_reboot diff --git a/sbin/ocs-live-get-img b/sbin/ocs-live-get-img index 0cfd534f..9a0420dd 100755 --- a/sbin/ocs-live-get-img +++ b/sbin/ocs-live-get-img @@ -130,7 +130,7 @@ task_run_restoring() { wget -P /tmp/ http://$cast_srv/$pseudo_img | tee -a ${OCS_LOGFILE} if [ ! -e /tmp/$pseudo_img ]; then [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE - echo "Failed to retreive $pseudo_img from http://$cast_srv/." | tee -a ${OCS_LOGFILE} + echo "Failed to retrieve $pseudo_img from http://$cast_srv/." | tee -a ${OCS_LOGFILE} [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL echo "$msg_program_stop" | tee -a ${OCS_LOGFILE} exit 1 diff --git a/sbin/ocs-live-netcfg b/sbin/ocs-live-netcfg index 93ddd682..cc958b47 100755 --- a/sbin/ocs-live-netcfg +++ b/sbin/ocs-live-netcfg @@ -46,7 +46,7 @@ USAGE() { echo " --ignore-gw Do not set default gateway." echo " --ignore-dns Do not set domain name server." echo " -r, --ignore-dv DV Do not config network device DV, such as 'eth1 eth2'." - echo " -w, --nic-type TYPE Use TYPE (wired or wireless) for the network deivce." + echo " -w, --nic-type TYPE Use TYPE (wired or wireless) for the network device." } # cfg_by_dhcp(){ @@ -355,8 +355,8 @@ if [ -z "$ocs_nic_type" ]; then # Inter-| sta-| Quality | Discarded packets | Missed | WE # face | tus | link level noise | nwid crypt frag retry misc | beacon | 22 # wlp4s0: 0000 68. -42. -256 0 0 0 0 154 0 - # However, /proc/net/wirless seems to be not working well for USB wireless - # device. Even when it's plugged, it's not shown in /proc/net/wirless. + # However, /proc/net/wireless seems to be not working well for USB wireless + # device. Even when it's plugged, it's not shown in /proc/net/wireless. case $netdev_type_on_system in "wired") ocs_nic_type="wired";; "wireless") ocs_nic_type="wireless";; diff --git a/sbin/ocs-live-preload b/sbin/ocs-live-preload index 594400f6..ae8bd4ea 100755 --- a/sbin/ocs-live-preload +++ b/sbin/ocs-live-preload @@ -17,8 +17,8 @@ # ocs_preload=tftp://192.168.100.254/my-custom.sh # ocs_preload="mount -t cifs //192.168.120.2/script/ /tmp/cifs -o user=administrator,password=yourpasswd" # ocs_preload4="mount -t nfs 192.168.120.254:/home/partimag/script/ /tmp/nfs -o ro" -# Multiple ocs_preload* are avaiable, just append a number after that. E.g. -# ocs_prealod=... ocs_preload1=... ocs_preload2=... +# Multiple ocs_preload* are available, just append a number after that. E.g. +# ocs_preload=... ocs_preload1=... ocs_preload2=... # Then in Clonezilla live ocs-live-preload will be run automatically and the file assigned by ocs_preload will be downloaded and extracted to /opt. Its mode will be set automatically, too. i.e. set as mode 755 and Unix format script. # @@ -62,7 +62,7 @@ USAGE() { echo " ocs_preload="mount -t cifs //192.168.120.2/script/ /tmp/cifs -o user=administrator,password=yourpasswd" " echo " ocs_preload4="mount -t nfs 192.168.120.254:/home/partimag/script/ /tmp/nfs -o ro" " echo "Multiple ocs_preload* are available, just append a number after that. E.g." - echo "ocs_prealod=... ocs_preload1=... ocs_preload2=..." + echo "ocs_preload=... ocs_preload1=... ocs_preload2=..." echo "Then in Clonezilla live $ocs will be run automatically and the file assigned by ocs_preload will be downloaded and extracted to ${dest}. Its mode will be set automatically, too. i.e. set as mode 755 and Unix format script." } # end of USAGE # @@ -338,7 +338,7 @@ convert_dos_format_script_from_zip_file() { } # end of convert_dos_format_script_from_zip_file # convert_dos_format_script_from_cp_rv_list() { - # chmod and conver to unix format for the copied files list + # chmod and convert to unix format for the copied files list # i.e. the files list got from: cp -rv source dest # The list is like (it might contain whitespace in file name): # '/tmp/cifs/my-script.sh.txt' -> '${dest}/my-script.sh.txt' @@ -443,13 +443,13 @@ overwrite_proc_boot_param() { # Found case 3 (xxx=xyz). Modify it. perl -pi -e "s|${im}=[^[:space:]]+[[:space:]]+|${im}=${iv} |g" $newcmdline else - # Not found. Appened it. + # Not found. Append it. perl -pi -e "s|^(.*)$|\$1 ${im}=\"${iv}\" |g" $newcmdline fi done ) else - # No any overwriting files. Exit this fucntion + # No any overwriting files. Exit this function return 2 fi if [ -e "$newcmdline" ]; then @@ -529,7 +529,7 @@ mkdir -p ${dest} # the ocs_preload has to be echoed or not. parse_cmdline_option -c $cmdl_file "echo_ocs_preload" -# Now start parsing the paramaters listed in $ocs_preload_list +# Now start parsing the parameters listed in $ocs_preload_list RETVAL=0 for i in $ocs_preload_list; do parse_cmdline_option -c $cmdl_file "$i" diff --git a/sbin/ocs-live-repository b/sbin/ocs-live-repository index 32495ea8..ac6de7e4 100755 --- a/sbin/ocs-live-repository +++ b/sbin/ocs-live-repository @@ -77,7 +77,7 @@ set_ocs_batch_mode() { # ocs_batch_mode will be passed to check_if_ocsroot_a_mountpoint # ocs_live_batch might be loaded from ocs-live.conf local assign_m="$1" - # ocs_live_batch has higher prority, so it can overwrite the mode assigned by assign_m + # ocs_live_batch has higher priority, so it can overwrite the mode assigned by assign_m if [ -n "$ocs_live_batch" ]; then case "$ocs_live_batch" in yes) ocs_batch_mode="on";; @@ -128,7 +128,7 @@ do_uri_mount_samba_server(){ # The URI for samba: # smb://[[domain;]username[:password]@]server[/share[/path]] # TODO: Security mode option (smb_sec_opt)? e.g. sec=ntlm, sec=ntlmv2 or auto - # smb_ver_opt is gloable variable, and will be used in load_ocsroot_mnt_cmd + # smb_ver_opt is global variable, and will be used in load_ocsroot_mnt_cmd local smb_scheme rc ask_ run_again_ans smb_scheme="$(drbl-uriparse "$ocs_repository" scheme)" smb_srv="$(drbl-uriparse "$ocs_repository" domain)" diff --git a/sbin/ocs-live-save b/sbin/ocs-live-save index 19b8f9cf..f89e1fa5 100755 --- a/sbin/ocs-live-save +++ b/sbin/ocs-live-save @@ -62,7 +62,7 @@ ask_and_load_lang_set $ocs_lang # run the main program check_if_tty1_and_continue -# Do not ask powerer/reboot/choose (-p) in ocs-sr, just use "-p true". Since it might be in bterm, and Debian live "Press Enter" message when poweroff/shutdown might be coverd by bterm and user will not have any idea what's happening after choose poweroff/reboot. +# Do not ask poweroff/reboot/choose (-p) in ocs-sr, just use "-p true". Since it might be in bterm, and Debian live "Press Enter" message when poweroff/shutdown might be covered by bterm and user will not have any idea what's happening after choose poweroff/reboot. ocs-live -p true # Show prompt show-general-ocs-live-prompt diff --git a/sbin/ocs-live-swap-kernel b/sbin/ocs-live-swap-kernel index 8f24c3e6..24014aa6 100755 --- a/sbin/ocs-live-swap-kernel +++ b/sbin/ocs-live-swap-kernel @@ -209,8 +209,8 @@ do_swap_kernel_and_module(){ if [ -e "$wd/$dest_zip_f" ]; then mv $mv_vopt $wd/$dest_zip_f $wd/${dest_zip_f}.orig fi - echo "The kernel versions before and after are:" > live/kerel-vers.txt - echo "$lnx_ver_old -> $lnx_ver." >> live/kerel-vers.txt + echo "The kernel versions before and after are:" > live/kernel-vers.txt + echo "$lnx_ver_old -> $lnx_ver." >> live/kernel-vers.txt echo "Packaging new Clonezilla live zip file..." zip -o -r $wd/$dest_zip_f ./ fi @@ -276,7 +276,7 @@ wd="$(pwd)" ocs_zip_tmpd="$(mktemp -d ocs_zipt.XXXXXX)" wd_tmp="$(mktemp -d ocs_swapk.XXXXXX)" -# I. Extact clonezilla zip file +# I. Extract clonezilla zip file echo $msg_delimiter_star_line if [ -e "$ocs_zip_f" ]; then echo "Unzip $ocs_zip_f..." diff --git a/sbin/ocs-lvm2-stop b/sbin/ocs-lvm2-stop index cd0e3406..e20d5d81 100755 --- a/sbin/ocs-lvm2-stop +++ b/sbin/ocs-lvm2-stop @@ -48,7 +48,7 @@ then then echo " Shutting Down logical volume: ${x} " lvchange -an --ignorelockingfailure -P ${x} >/dev/null 2>&1 - # eend $? + # end $? fi done @@ -59,7 +59,7 @@ then then echo " Shutting Down volume group: ${x} " vgchange -an --ignorelockingfailure -P ${x} >/dev/null 2>&1 - # eend + # end fi done diff --git a/sbin/ocs-makeboot b/sbin/ocs-makeboot index f6bede68..fc460007 100755 --- a/sbin/ocs-makeboot +++ b/sbin/ocs-makeboot @@ -13,7 +13,7 @@ DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" # prog="$(basename $0)" -# Default Sttings +# Default Settings KERNEL_FILE_DEFAULT="$kernel_file" INITRD_FILE_DEFAULT="$initrd_file" # default to confirm diff --git a/sbin/ocs-match-checksum b/sbin/ocs-match-checksum index 95858902..cf8a9d48 100755 --- a/sbin/ocs-match-checksum +++ b/sbin/ocs-match-checksum @@ -70,7 +70,7 @@ if [ "$ocs_chk_img_name" = "ask_user" ]; then ocs_chk_img_name="$target_dir" fi [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING -echo "$msg_the_image_to_be_cheked: $ocs_chk_img_name" +echo "$msg_the_image_to_be_verified: $ocs_chk_img_name" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL if [ "$ocs_chk_dev" = "ask_user" ]; then diff --git a/sbin/ocs-onthefly b/sbin/ocs-onthefly index 0bc1f18b..ffc0cc97 100755 --- a/sbin/ocs-onthefly +++ b/sbin/ocs-onthefly @@ -39,12 +39,12 @@ DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" # Load the config in ocs-live.conf. This is specially for Clonezilla live. It will overwrite some settings of /etc/drbl/drbl-ocs.conf, such as $DIA... [ -e "/etc/ocs/ocs-live.conf" ] && . /etc/ocs/ocs-live.conf -# By default the prevous partclone and ONTHEFLY_NET_PIPE service will be killed +# By default the previous partclone and ONTHEFLY_NET_PIPE service will be killed keep_netpipe="no" # Default to run ocs-update-initrd to update the initramfs of restored OS do_update_initrd="yes" # -d2d_psuedo_img="d2d-pseudo" +d2d_pseudo_img="d2d-pseudo" # Local functions: # check if the user input /dev/hda, /dev/hdb... @@ -72,7 +72,7 @@ check_input_param() { # kill_clone_prog_nc_process() { local i - echo "Terminate partimage and $NC_CMD processs if they exist..." | tee --append ${OCS_LOGFILE} + echo "Terminate partimage and $NC_CMD process if they exist..." | tee --append ${OCS_LOGFILE} for i in partclone partimage ntfsclone dd nc netcat nuttcp; do echo "pkill -u root $i" && pkill -u root $i done @@ -82,7 +82,7 @@ confirm_do_it_in_target_dev() { local DEV_MODEL machine_name if [ "$mode" = "local" -o "$STATUS" = "clone_client" ]; then # From target_hd, we can get the partitions list - # We need the partition table to conver the selected HD to partitions. + # We need the partition table to convert the selected HD to partitions. tgt_parts="" for idisk in $target_hd; do BACKUP_DEVS="" @@ -124,7 +124,7 @@ confirm_do_it_in_target_dev() { } # end of confirm_do_it_in_target_dev # prepare_src_dev_pseudo_img() { - local save_psuedo_img_cmd save_mode gen_chksum_opt + local save_pseudo_img_cmd save_mode gen_chksum_opt if [ "$chksum_for_files_in_dev" = "yes" ]; then gen_chksum_opt="-gmf" fi @@ -132,19 +132,19 @@ prepare_src_dev_pseudo_img() { disk) save_mode="savedisk" ;; partition) save_mode="saveparts" ;; esac - save_psuedo_img_cmd="LC_ALL=C ocs-sr --ocsroot $hd_src_tmp -luks no -sfsck -sfs -nogui -q2 --batch -j2 -scs -senc -p true $gen_chksum_opt $save_mode $d2d_psuedo_img $src_dev" + save_pseudo_img_cmd="LC_ALL=C ocs-sr --ocsroot $hd_src_tmp -luks no -sfsck -sfs -nogui -q2 --batch -j2 -scs -senc -p true $gen_chksum_opt $save_mode $d2d_pseudo_img $src_dev" echo "Saving the source device as a pseudo image. Running:" - echo "$save_psuedo_img_cmd" - eval $save_psuedo_img_cmd + echo "$save_pseudo_img_cmd" + eval $save_pseudo_img_cmd if [ "$STATUS" = "clone_server" ]; then # Keep the source type, device and other info otherwise when destination is different, it will be changed - cat <<-ONTHEFLY_LOCAL_END > $hd_src_tmp/$d2d_psuedo_img/ocs-onthefly-param.info + cat <<-ONTHEFLY_LOCAL_END > $hd_src_tmp/$d2d_pseudo_img/ocs-onthefly-param.info opt_for_ocs_sr_restore_assigned_from_src="$opt_for_ocs_sr_restore_this_run" ONTHEFLY_LOCAL_END fi (cd $hd_src_tmp - tar -czf $d2d_psuedo_img.tgz $d2d_psuedo_img/* + tar -czf $d2d_pseudo_img.tgz $d2d_pseudo_img/* ) } # end of prepare_src_dev_pseudo_img # @@ -194,8 +194,8 @@ prepare_network_clone_dev_info() { fi # wait for client to download it case "$ONTHEFLY_NET_PIPE" in - netcat) run_cmd="cat $hd_src_tmp/${d2d_psuedo_img}.tgz | $NC_CMD -l $NC_LOCAL_PORT_OPT $NC_PORT &" ;; - nuttcp) run_cmd="cat $hd_src_tmp/${d2d_psuedo_img}.tgz | $NC_CMD -1 -s --nofork $NUTTCP_SRV_EXTRA_OPT -P $NC_PORT -p $((NC_PORT + 1)) &" ;; + netcat) run_cmd="cat $hd_src_tmp/${d2d_pseudo_img}.tgz | $NC_CMD -l $NC_LOCAL_PORT_OPT $NC_PORT &" ;; + nuttcp) run_cmd="cat $hd_src_tmp/${d2d_pseudo_img}.tgz | $NC_CMD -1 -s --nofork $NUTTCP_SRV_EXTRA_OPT -P $NC_PORT -p $((NC_PORT + 1)) &" ;; esac echo "Running: $run_cmd" eval $run_cmd @@ -241,8 +241,8 @@ prepare_network_clone_dev_info() { fi # Get the pt and mbr... from server case "$ONTHEFLY_NET_PIPE" in - netcat) run_cmd="$NC_CMD $NC_CLIENT_EXTRA_OPT $SOURCE_IP $NC_PORT > $hd_tgt_tmp/${d2d_psuedo_img}.tgz" ;; - nuttcp) run_cmd="$NC_CMD -r -s $NUTTCP_CLI_EXTRA_OPT -P $NC_PORT -p $((NC_PORT + 1)) $SOURCE_IP 2>>$ocs_nuttcp_log > $hd_tgt_tmp/${d2d_psuedo_img}.tgz" ;; + netcat) run_cmd="$NC_CMD $NC_CLIENT_EXTRA_OPT $SOURCE_IP $NC_PORT > $hd_tgt_tmp/${d2d_pseudo_img}.tgz" ;; + nuttcp) run_cmd="$NC_CMD -r -s $NUTTCP_CLI_EXTRA_OPT -P $NC_PORT -p $((NC_PORT + 1)) $SOURCE_IP 2>>$ocs_nuttcp_log > $hd_tgt_tmp/${d2d_pseudo_img}.tgz" ;; esac echo "Running: $run_cmd" eval $run_cmd @@ -255,42 +255,42 @@ prepare_network_clone_dev_info() { exit 1 fi NC_PORT=$((NC_PORT + 6)) - if [ ! -f "$hd_tgt_tmp/${d2d_psuedo_img}.tgz" ]; then + if [ ! -f "$hd_tgt_tmp/${d2d_pseudo_img}.tgz" ]; then [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE - echo "The partition table, MBR infomation is not received from another machine (IP address $SOURCE_IP)!" | tee --append ${OCS_LOGFILE} + echo "The partition table, MBR information is not received from another machine (IP address $SOURCE_IP)!" | tee --append ${OCS_LOGFILE} echo "$msg_program_stop" | tee --append ${OCS_LOGFILE} [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL exit 1 fi ( cd $hd_tgt_tmp/ - tar -xzf ${d2d_psuedo_img}.tgz + tar -xzf ${d2d_pseudo_img}.tgz ) fi } # end of prepare_network_clone_dev_info # local_dev_clone() { - local restore_psuedo_img_cmd + local restore_pseudo_img_cmd case "$source_type" in partition) - restore_psuedo_img_cmd="LC_ALL=C ocs-sr --ocsroot $hd_src_tmp -l en_US.UTF-8 --batch -t2 -scr -p true $opt_for_ocs_sr_restore_this_run ld2d_restoreparts $d2d_psuedo_img $tgt_dev" + restore_pseudo_img_cmd="LC_ALL=C ocs-sr --ocsroot $hd_src_tmp -l en_US.UTF-8 --batch -t2 -scr -p true $opt_for_ocs_sr_restore_this_run ld2d_restoreparts $d2d_pseudo_img $tgt_dev" echo "Cloning the source device to /dev/$tgt_dev. Running:" - echo "$restore_psuedo_img_cmd" - eval $restore_psuedo_img_cmd + echo "$restore_pseudo_img_cmd" + eval $restore_pseudo_img_cmd ;; disk) echo $msg_delimiter_star_line - restore_psuedo_img_cmd="LC_ALL=C ocs-sr --ocsroot $hd_src_tmp -l en_US.UTF-8 --batch -j2 -scr -p true $opt_for_ocs_sr_restore_this_run ld2d_restoredisk $d2d_psuedo_img $target_hd" + restore_pseudo_img_cmd="LC_ALL=C ocs-sr --ocsroot $hd_src_tmp -l en_US.UTF-8 --batch -j2 -scr -p true $opt_for_ocs_sr_restore_this_run ld2d_restoredisk $d2d_pseudo_img $target_hd" echo "Cloning the source device to /dev/$tgt_dev. Running:" - echo "$restore_psuedo_img_cmd" - eval $restore_psuedo_img_cmd + echo "$restore_pseudo_img_cmd" + eval $restore_pseudo_img_cmd ;; esac } # end of local_dev_clone # clone_over_net() { local fn example_target ipart part_fs size my_ip_one use_netcat_nuttcp_opt - local restore_psuedo_img_cmd + local restore_pseudo_img_cmd if [ "$STATUS" = "clone_server" ]; then case "$source_type" in partition) @@ -335,21 +335,21 @@ clone_over_net() { esac elif [ "$STATUS" = "clone_client" ]; then # To obtain opt_for_ocs_sr_restore_assigned_from_src provided by server - . $hd_tgt_tmp/${d2d_psuedo_img}/ocs-onthefly-param.info + . $hd_tgt_tmp/${d2d_pseudo_img}/ocs-onthefly-param.info case "$source_type" in partition) echo $msg_delimiter_star_line - restore_psuedo_img_cmd="LC_ALL=C ocs-sr --ocsroot $hd_tgt_tmp -l en_US.UTF-8 --batch -j2 -scr -p true --data-port $NC_PORT $opt_for_ocs_sr_restore_assigned_from_src $opt_for_ocs_sr_restore_this_run nd2d_restoreparts $d2d_psuedo_img $tgt_dev" + restore_pseudo_img_cmd="LC_ALL=C ocs-sr --ocsroot $hd_tgt_tmp -l en_US.UTF-8 --batch -j2 -scr -p true --data-port $NC_PORT $opt_for_ocs_sr_restore_assigned_from_src $opt_for_ocs_sr_restore_this_run nd2d_restoreparts $d2d_pseudo_img $tgt_dev" echo "Cloning the source device to /dev/$tgt_dev. Running:" - echo "$restore_psuedo_img_cmd" - eval $restore_psuedo_img_cmd + echo "$restore_pseudo_img_cmd" + eval $restore_pseudo_img_cmd ;; disk) echo $msg_delimiter_star_line - restore_psuedo_img_cmd="LC_ALL=C ocs-sr --ocsroot $hd_tgt_tmp -l en_US.UTF-8 --batch -j2 -scr -p true --data-port $NC_PORT $opt_for_ocs_sr_restore_assigned_from_src $opt_for_ocs_sr_restore_this_run nd2d_restoredisk $d2d_psuedo_img $target_hd" + restore_pseudo_img_cmd="LC_ALL=C ocs-sr --ocsroot $hd_tgt_tmp -l en_US.UTF-8 --batch -j2 -scr -p true --data-port $NC_PORT $opt_for_ocs_sr_restore_assigned_from_src $opt_for_ocs_sr_restore_this_run nd2d_restoredisk $d2d_pseudo_img $target_hd" echo "Cloning the source device to /dev/$tgt_dev. Running:" - echo "$restore_psuedo_img_cmd" - eval $restore_psuedo_img_cmd + echo "$restore_pseudo_img_cmd" + eval $restore_pseudo_img_cmd ;; esac fi @@ -448,7 +448,7 @@ USAGE() { echo "-b, -batch, --batch, --batch-mode (DANGEROUS!) Run program in batch mode, i.e. without any prompt or wait for pressing enter key. //NOTE// You have to use '-batch' instead of '-b' when you want to use it in the boot parameters. Otherwise the program init on system will honor '-b', too." echo "-cmf, --chk-chksum-for-files-in-dev Do the files checksum inspection for cloned files in destination devices." echo "-d, --destination, --target DEV Specify the target device as DEV (can be with or without /dev/, e.g., /dev/sda or sda, /dev/sda1 or sda1...)" - echo "-e1, --change-geometry NTFS-BOOT-PARTITION Force to change the CHS (cylinders, heads, sectors) value of NTFS boot partitoin after image is restored. NTFS-BOOT-PARTITION can be one of \"/dev/sda1\", \"/dev/sda2\"... or \"auto\" (\"auto\" will let clonezilla detect the NTFS boot partition automatically)" + echo "-e1, --change-geometry NTFS-BOOT-PARTITION Force to change the CHS (cylinders, heads, sectors) value of NTFS boot partition after image is restored. NTFS-BOOT-PARTITION can be one of \"/dev/sda1\", \"/dev/sda2\"... or \"auto\" (\"auto\" will let clonezilla detect the NTFS boot partition automatically)" echo "-e2, --load-geometry-from-edd Force to use the CHS (cylinders, heads, sectors) from EDD (Enhanced Disk Device) when creating partition table by sfdisk" echo "-r, --resize-partition Resize the file system size to fit the partition size in the destination disk. It is normally used when when a small partition image is restored to a larger partition." echo "-f, --source DEV Specify the source device as DEV (can be with or without /dev/, e.g., /dev/sda or sda, /dev/sda1 or sda1...)" @@ -591,8 +591,8 @@ get_onthefly_input_param() { local TMP ASK_OCS_ONTHEFLY_TYPE ocs_otf_type # (1) disk to local disk # (2) disk to remote disk - # (3) partiiton to local partition - # (4) partiiton to remote partition + # (3) partition to local partition + # (4) partition to remote partition if [ "$show_local_menu_in_ocs_onthefly" = "yes" ]; then # Only menus for local cloning @@ -787,7 +787,7 @@ set_ocs_onthefly_extra_param() { if LC_ALL=C grep -Ew -- "(-k1|-k2)" $OCS_PARAM_TMP &>/dev/null; then # Option -k1 or -k2 is for different partition size, turn on -r and -icds by default if [ -z "$(LC_ALL=C grep -Ew -- "-r" $OCS_PARAM_TMP)" ]; then - echo "Since the mode you choose might resize partition size, we turn on file system resize funtion automatically (-r)..." + echo "Since the mode you choose might resize partition size, we turn on file system resize function automatically (-r)..." echo " -r " >> $OCS_PARAM_TMP fi if [ -z "$(LC_ALL=C grep -Ew -- "-icds" $OCS_PARAM_TMP)" ]; then @@ -994,7 +994,7 @@ parse_ocs_onthefly_cmd_options() { } # End of parse_ocs_onthefly_cmd_options # remove_src_dest_etc_opt() { - # function to remove -f dev -d dev, and keep the rest of opttions for ocs-sr in restoring mode + # function to remove -f dev -d dev, and keep the rest of options for ocs-sr in restoring mode # more options should not be passed to ocs-sr, e.g., -rvd, -p x (force to run -p true) local left_opt while [ $# -gt 0 ]; do @@ -1206,7 +1206,7 @@ ask_ocs_onthefly_dest_dev() { convert_serialno_to_blkdev(){ local srl_no_="$1" # Only one input device will be mapped since for ocs-onthefly this is the case. - # Ouput the variable $blk_dev + # Output the variable $blk_dev # Format the input SERIALNO= to be uppercase srl_no_="$(echo $srl_no_ | sed -r -e "s/serialno=/SERIALNO=/gi")" @@ -1451,8 +1451,8 @@ if [ "$mode" = "local" -o "$STATUS" = "clone_server" ]; then hd_src_tmp="$(mktemp -d /tmp/ocs_onthefly_src.XXXXXX)" prepare_src_dev_pseudo_img # dev-fs.list is got when ocs-sr save an image which is run in prepare_src_dev_pseudo_img. - src_pt_info="$hd_src_tmp/$d2d_psuedo_img/dev-fs.list" - src_parted_info="$hd_src_tmp/$d2d_psuedo_img/${source_hd}-pt.parted" + src_pt_info="$hd_src_tmp/$d2d_pseudo_img/dev-fs.list" + src_parted_info="$hd_src_tmp/$d2d_pseudo_img/${source_hd}-pt.parted" elif [ "$STATUS" = "clone_client" ]; then hd_tgt_tmp="$(mktemp -d /tmp/ocs_onthefly_tgt.XXXXXX)" fi diff --git a/sbin/ocs-prep-cache b/sbin/ocs-prep-cache index 36661931..ce45345f 100755 --- a/sbin/ocs-prep-cache +++ b/sbin/ocs-prep-cache @@ -169,7 +169,7 @@ if [ "$use_dev_list_cache" = "yes" ]; then gen_dev_fs_cache_file ;; esac else - echo "use_dev_list_cache is set as no. Do not prepar device name cache files in $dev_list_cache_dir/..." + echo "use_dev_list_cache is set as no. Do not prepare device name cache files in $dev_list_cache_dir/..." exit 0 fi diff --git a/sbin/ocs-prep-repo b/sbin/ocs-prep-repo index 92bec06d..31569d89 100755 --- a/sbin/ocs-prep-repo +++ b/sbin/ocs-prep-repo @@ -701,14 +701,14 @@ check_portmap_nfs_common_daemon() { fi pid_rpcbind="$(LC_ALL=C pidof rpcbind)" if [ -z "$pid_rpcbind" ]; then - echo "Service rpcbind is necesary for NFS client. Start it now..." + echo "Service rpcbind is necessary for NFS client. Start it now..." systemctl start rpcbind fi # We assume nfs-common only runs rpc.statd (for NFS3), no rpc.lockd. This is true for modern kernel (>=2.4). pid_rpc_statd="$(LC_ALL=C pidof rpc.statd)" if [ -z "$pid_rpc_statd" ]; then if [ -e /etc/init.d/nfs-common ]; then - echo "nfs-common service is necesary for NFS client. Start it now..." + echo "nfs-common service is necessary for NFS client. Start it now..." /etc/init.d/nfs-common start fi fi @@ -992,7 +992,7 @@ do_mount_s3_server(){ [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "(2) Save it as file /root/.passwd-s3fs" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL - echo "If it's ready on remote manchine, you can run something like to copy it:" + echo "If it's ready on remote machine, you can run something like to copy it:" echo "scp myaccount@myserver:/root/.passwd-s3fs /root/.passwd-s3fs" [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "(3) Run command: chmod 600 /root/.passwd-s3fs" @@ -1026,7 +1026,7 @@ do_mount_swift_server(){ echo "password=supersecret" echo "authurl=http://10.10.0.1:5000/v2.0" echo "(for use with OpenStack, noting that 'tenant' should be the tenant name, rather than the ID)" - echo "If it's ready on remote manchine, you can run something like to copy it:" + echo "If it's ready on remote machine, you can run something like to copy it:" echo "scp myaccount@myserver:/root/.cloudfuse /root/.cloudfuse" echo "For more info, run: zless /usr/share/doc/cloudfuse/README.gz" [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING diff --git a/sbin/ocs-put-signed-grub2-efi-bldr b/sbin/ocs-put-signed-grub2-efi-bldr index aac3a5bc..076097a1 100755 --- a/sbin/ocs-put-signed-grub2-efi-bldr +++ b/sbin/ocs-put-signed-grub2-efi-bldr @@ -2,7 +2,7 @@ # Author: Steven Shiau # License: GPL # Program to put the signed EFI boot loader from Ubuntu -# Ref: 1. /usr/sbin/grub-install from package grub2-common (verson 2.00-13ubuntu3) on Ubuntu 13.04 (Raring) +# Ref: 1. /usr/sbin/grub-install from package grub2-common (version 2.00-13ubuntu3) on Ubuntu 13.04 (Raring) # 2. https://wiki.edubuntu.org/SecurityTeam/SecureBoot # Required files from packages on Ubuntu: # shim-signed: /usr/lib/shim/shim.efi.signed diff --git a/sbin/ocs-related-srv b/sbin/ocs-related-srv index 36d93b83..0a1e3102 100755 --- a/sbin/ocs-related-srv +++ b/sbin/ocs-related-srv @@ -143,8 +143,8 @@ if [ "$hw_detect" != "off" ]; then for ihw in kudzu harddrake discover hwscan; do if [ "$ihw" = "kudzu" ]; then if [ -x "$RCX_REL_INITD/kudzu" ]; then - # We have to modify kudzu, thereforce we can not use link since it will affect those services in rc[3-5].d - # The reason we have to modify is because kudzu will force to change to rc5.d if /var/run/Xconfig is found. But actually for Clonezilla we need to saty in rc1.d, we can not change to rc5 since S19ocs-run will be run later (S19) + # We have to modify kudzu, therefore we can not use link since it will affect those services in rc[3-5].d + # The reason we have to modify is because kudzu will force to change to rc5.d if /var/run/Xconfig is found. But actually for Clonezilla we need to stay in rc1.d, we can not change to rc5 since S19ocs-run will be run later (S19) # In kudzu, comment these 2 lines: # grep -q "^id:5:initdefault:" /etc/inittab && telinit 5 # and diff --git a/sbin/ocs-resize-part b/sbin/ocs-resize-part index 39988866..d9566ab5 100755 --- a/sbin/ocs-resize-part +++ b/sbin/ocs-resize-part @@ -134,7 +134,7 @@ case "$part_fs" in mount -t xfs ${partition} $XFS_TMP rc=$? if [ "$rc" -eq 0 ]; then - echo "Runninig \"xfs_growfs ${partition}\"..." + echo "Running \"xfs_growfs ${partition}\"..." xfs_growfs ${partition} sleep 1 umount ${partition} @@ -181,7 +181,7 @@ case "$part_fs" in mount -t btrfs ${partition} $BTRFS_TMP rc=$? if [ "$rc" -eq 0 ]; then - # Was: echo "Runninig \"btrfsctl -r max ${BTRFS_TMP}\"..." + # Was: echo "Running \"btrfsctl -r max ${BTRFS_TMP}\"..." # Was: btrfsctl -r max ${BTRFS_TMP} echo "Running \"btrfs filesystem resize max ${BTRFS_TMP}\"..." btrfs filesystem resize max ${BTRFS_TMP} diff --git a/sbin/ocs-restore-ebr b/sbin/ocs-restore-ebr index 51a407a3..0408acaf 100755 --- a/sbin/ocs-restore-ebr +++ b/sbin/ocs-restore-ebr @@ -95,7 +95,7 @@ target_dir_fullpath="$ocsroot/$target_dir" for ipart in $target_part; do # 1st, check if this partition on a MBR disk, not GPT one. dsk_pt="$target_dir_fullpath/$(to_filename $(get_diskname ${ipart}))-pt.parted" - if ! `is_mbr_partitition_table_file $dsk_pt`; then + if ! `is_mbr_partition_table_file $dsk_pt`; then echo "Partition $ipart is not on MBR disk. Maybe it's on GPT one. No need to restore the EBR data." continue fi diff --git a/sbin/ocs-restore-mbr b/sbin/ocs-restore-mbr index 04d200d2..8e8276cb 100755 --- a/sbin/ocs-restore-mbr +++ b/sbin/ocs-restore-mbr @@ -15,7 +15,7 @@ DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}" # Load the config in ocs-live.conf. This is specially for Clonezilla live. It will overwrite some settings of /etc/drbl/drbl-ocs.conf, such as $DIA... [ -e "/etc/ocs/ocs-live.conf" ] && . /etc/ocs/ocs-live.conf -# Setings +# Settings # By default we do not restore the prebuild mbr from syslinux. restore_prebuild_mbr="no" diff --git a/sbin/ocs-restore-mdisks b/sbin/ocs-restore-mdisks index 77c390d2..87a37721 100755 --- a/sbin/ocs-restore-mdisks +++ b/sbin/ocs-restore-mdisks @@ -3,7 +3,7 @@ # License: GPL # This program is used to restore an image to multiple disks, especially many USB flash drives in a same machine by using Clonezilla live. -# Thanks to T. C. Lin for this idea and testing, and Alvin Su for debuging. +# Thanks to T. C. Lin for this idea and testing, and Alvin Su for debugging. # For more details, please refer to: # http://drbl.sourceforge.net/faq/fine-print.php?path=./2_System/98_one_image_to_multiple_disks.faq#98_one_image_to_multiple_disks.faq @@ -225,7 +225,7 @@ elif [ -n "$(echo "$tgt_dsks" | grep -Ei "\*")" ]; then fi # -# Check inupt values +# Check input values # 1. image name check_input_target_image "$ocsroot/$image_name" # 2. destination disks @@ -247,7 +247,7 @@ if [ -z "$OCS_OPTS" ]; then run_again_flag="true" fi # Extract the postaction, like "-p poweroff", "-p choose" for later use, and for ocs-sr to use "-p true" only, -# otherwise when ocs-sr is run with "-p choose", multiple ocs-sr will lead to multiplie same questions... +# otherwise when ocs-sr is run with "-p choose", multiple ocs-sr will lead to multiple same questions... mdev_postact="$(echo $OCS_OPTS | grep -Ewo -- "-p[[:space:]]+([^-]|$)+")" # mdev_postact is like: "-p true" or "-p poweroff" -> strip -p, make it as "true" or "poweroff" # When ocsmr_lastaction is not assigned, use mdev_postact to convert it. diff --git a/sbin/ocs-restore-veracrypt-vh b/sbin/ocs-restore-veracrypt-vh index 2ebb43e5..ba216223 100755 --- a/sbin/ocs-restore-veracrypt-vh +++ b/sbin/ocs-restore-veracrypt-vh @@ -2,7 +2,7 @@ # Author: Steven Shiau # License: GPL # Description: Program to restore the volume header of Veracrypt disk -# Only for uEFI/GPT mode +# Only for UEFI/GPT mode # Ref: https://sourceforge.net/p/veracrypt/discussion/technical/thread/fe03328c/ # https://habr.com/ru/post/150209/ diff --git a/sbin/ocs-run-boot-param b/sbin/ocs-run-boot-param index e9018437..e9bccc4e 100755 --- a/sbin/ocs-run-boot-param +++ b/sbin/ocs-run-boot-param @@ -88,7 +88,7 @@ parse_cmdline_option -c $cmdl_file "echo_${ocs_param}" eval echo_ocs_param="\$echo_$ocs_param" -# Now start parsing the paramaters listed in $ocs_param_list +# Now start parsing the parameters listed in $ocs_param_list RETVAL=0 for i in $ocs_param_list; do parse_cmdline_option -c $cmdl_file "$i" diff --git a/sbin/ocs-save-veracrypt-vh b/sbin/ocs-save-veracrypt-vh index 2babb214..54e38c87 100755 --- a/sbin/ocs-save-veracrypt-vh +++ b/sbin/ocs-save-veracrypt-vh @@ -2,7 +2,7 @@ # Author: Steven Shiau # License: GPL # Description: Program to dump the volume header of Veracrypt disk -# Only for uEFI/GPT mode +# Only for UEFI/GPT mode # Ref: https://sourceforge.net/p/veracrypt/discussion/technical/thread/fe03328c/ # https://habr.com/ru/post/150209/ diff --git a/sbin/ocs-sr b/sbin/ocs-sr index 8e387f77..55eaf1a8 100755 --- a/sbin/ocs-sr +++ b/sbin/ocs-sr @@ -44,8 +44,8 @@ gen_b2sum="no" check_b2sum="no" gen_chksum_for_files_in_dev="no" chk_chksum_for_files_in_dev="no" -chk_img_restoreable_mod_save_def="yes" -chk_img_restoreable_mod_restore_def="yes" +chk_img_restorable_mod_save_def="yes" +chk_img_restorable_mod_restore_def="yes" # Flag to save restoring error log save_restore_error_log="no" # Flag to check target disk size before creating partition table @@ -77,7 +77,7 @@ sfdisk_opt="--force" dump_mbr_in_the_end="no" # The flag to save or restore the hidden data between MBR and 1st partition. clone_hidden_data="no" -# default output for udpcast stderr is surpressed. +# default output for udpcast stderr is suppressed. # NOTE! Do not redirect it to standard output (stdin), otherwise partimage/ntfsclone pipe will get wrong image! udpcast_stderr="/dev/null" # default not to run those scripts in $OCS_PRERUN_DIR $OCS_POSTRUN_DIR @@ -130,7 +130,7 @@ USAGE() { echo "When in saving mode, the DEVICE name can also be assigned by:" echo "For disk: PTUUID or SERIALNO (short format), e.g., PTUUID=03c8b280-47aa-4881-aca5-9b9c66fe28c7." echo "For partition: UUID or PARTUUID, e.g., UUID=0b51ce79-7bc0-4111-8a40-839461a9b12f" - echo "When in resotoring mode, the DEVICE name can also be assigned by (for disk only):" + echo "When in restoring mode, the DEVICE name can also be assigned by (for disk only):" echo "SERIALNO (short format), e.g., SERIALNO=2YK8XSYD." echo "If there are spaces in SERIALNO, replace every space by \"_\"" echo @@ -147,7 +147,7 @@ USAGE() { echo " Options for restoring:" USAGE_common_restore echo " --mcast-port NO Assign the udp port number for multicast restore. This is used by clonezilla server. Normally it's not necessary to manually assign this option." - echo " -ssnf, --skip-set-netboot-first Skip setting 1st boot device as network in uEFI NVRAM of the restored machine." + echo " -ssnf, --skip-set-netboot-first Skip setting 1st boot device as network in UEFI NVRAM of the restored machine." USAGE_reserved_word_for_restore echo echo " General options:" @@ -181,7 +181,7 @@ parse_ocs_sr_cmd_options_with_dash() { # a problem here: # The parameters (-b -g auto --nogui --max-time-to-wait 300 --language 0 multicast_restoreparts sarge-base "hda1 hda3" 2232), when put it as $*, it will # become (-b -g auto --nogui --max-time-to-wait 300 --language 0 multicast_restoreparts sarge-base hda1 hda3 2232), you see, "hda1 hda3" -> hda1 hda3 - # Then everyting is in a mess... so now the best solution I can find is to + # Then everything is in a mess... so now the best solution I can find is to # calculate the n_shift, then parse it to original shell, not in the function. n_shift=0 @@ -299,11 +299,11 @@ parse_ocs_sr_cmd_options_with_dash() { shift; n_shift=$((n_shift+1));; -sc|-scs|--skip-check-restorable|--skip-check-restorable-s) # Flag to check if the image is restorable - chk_img_restoreable_mod_save="no" + chk_img_restorable_mod_save="no" shift; n_shift=$((n_shift+1));; -scr|--skip-check-restorable-r) # Flag to check if the image is restorable - chk_img_restoreable_mod_restore="no" + chk_img_restorable_mod_restore="no" shift; n_shift=$((n_shift+1));; -srel|--save-restore-error-log) # Flag to save restoring log @@ -457,7 +457,7 @@ parse_ocs_sr_cmd_options_with_dash() { IMG_CLONE_CMP="zstdmt -c $extra_zstdmt_opt" shift; n_shift=$((n_shift+1));; -nogui|--nogui) - # -nogui is for backward compatable, better to use --nogui + # -nogui is for backward compatibility, better to use --nogui nogui="on" shift; n_shift=$((n_shift+1));; -ntfs-ok|--ntfs-ok) @@ -532,7 +532,7 @@ parse_ocs_sr_cmd_options_with_dash() { USE_PARTCLONE="yes" shift; n_shift=$((n_shift+1));; -j|--create-part-by-sfdisk) - # We leave this option for backward compatability. + # We leave this option for backward compatibility. create_part_by_sfdisk="yes" shift; n_shift=$((n_shift+1));; -j0|--create-part-by-dd) @@ -580,7 +580,7 @@ parse_ocs_sr_cmd_options_with_dash() { [ -z "$win_hostname_prefix" ] && USAGE && exit 1 ;; -o|-o1|--run-postrun-dir) - # -o is for backward compatability + # -o is for backward compatibility run_postrun_dir="yes" shift; n_shift=$((n_shift+1));; -o0|--run-prerun-dir) @@ -835,7 +835,7 @@ wrap_up_opt() { echo "PARTIMAGE_RESTORE_OPT: $PARTIMAGE_RESTORE_OPT" echo "PARTCLONE_SAVE_OPT: $PARTCLONE_SAVE_OPT" echo "PARTCLONE_RESTORE_OPT: $PARTCLONE_RESTORE_OPT" - # The default output for udpcast stderr is surpressed, now turn it on + # The default output for udpcast stderr is suppressed, now turn it on udpcast_stderr="/dev/stderr" fi # If VOL_LIMIT is too large, split won't work. Check and fix it if required. @@ -849,13 +849,13 @@ wrap_up_opt_after_interactive_selection() { case "$ocs_sr_type" in "savedisk"|"saveparts") - if [ -z "$chk_img_restoreable_mod_save" ]; then - chk_img_restoreable_mod_save="$chk_img_restoreable_mod_save_def" + if [ -z "$chk_img_restorable_mod_save" ]; then + chk_img_restorable_mod_save="$chk_img_restorable_mod_save_def" fi ;; "restoredisk"|"restoreparts") - if [ -z "$chk_img_restoreable_mod_restore" ]; then - chk_img_restoreable_mod_restore="$chk_img_restoreable_mod_restore_def" + if [ -z "$chk_img_restorable_mod_restore" ]; then + chk_img_restorable_mod_restore="$chk_img_restorable_mod_restore_def" fi ;; esac @@ -981,7 +981,7 @@ create_clonezilla_live_recovery_iso_zip() { done echo > $OCS_PARAM_TMP # clean OCS_PARAM_TMP - # Generage iso, zip or both ? + # Generate iso, zip or both ? $DIA --backtitle "$msg_nchc_free_software_labs" --title "$msg_nchc_clonezilla | $msg_mode: $ocs_mode_prompt" \ --menu "$msg_recovery_clonezilla_file_type $msg_choose_file_type" \ 0 0 0 \ @@ -1347,7 +1347,7 @@ case "$ocs_sr_type" in target_hd="$(cat $ANS_TMP | tr -d \")" [ -f "$ANS_TMP" ] && rm -f $ANS_TMP get_extra_param_when_type_is_ask_user_and_interactive_mode - wrap_up_opt_after_interactive_selection # Since extra param inputed again, wrap up again + wrap_up_opt_after_interactive_selection # Since extra param entered again, wrap up again run_ocs_sr_again_prompt "$target_dir" "$target_hd" @@ -1451,7 +1451,7 @@ case "$ocs_sr_type" in target_hd="$ocs_sr_dev" fi get_extra_param_when_type_is_ask_user_and_interactive_mode - wrap_up_opt_after_interactive_selection # Since extra param inputed again, wrap up again + wrap_up_opt_after_interactive_selection # Since extra param entered again, wrap up again run_ocs_sr_again_prompt "$target_dir" "$target_hd" @@ -1564,7 +1564,7 @@ case "$ocs_sr_type" in target_parts="$(cat $ANS_TMP | tr -d \")" [ -f "$ANS_TMP" ] && rm -f $ANS_TMP get_extra_param_when_type_is_ask_user_and_interactive_mode - wrap_up_opt_after_interactive_selection # Since extra param inputed again, wrap up again + wrap_up_opt_after_interactive_selection # Since extra param entered again, wrap up again run_ocs_sr_again_prompt "$target_dir" "$target_parts" @@ -1658,7 +1658,7 @@ case "$ocs_sr_type" in fi # get_extra_param_when_type_is_ask_user_and_interactive_mode - wrap_up_opt_after_interactive_selection # Since extra param inputed again, wrap up again + wrap_up_opt_after_interactive_selection # Since extra param entered again, wrap up again # Append the option if restoring to different partition on the destination disk. if [ -n "$source_part" ]; then OCS_OPTS="$OCS_OPTS -f $source_part" diff --git a/sbin/ocs-srv-live b/sbin/ocs-srv-live index be35d16b..2ea78901 100755 --- a/sbin/ocs-srv-live +++ b/sbin/ocs-srv-live @@ -39,7 +39,7 @@ USAGE() { # start_ocs_srv() { # start drbl live first, which will setup drbl environment - echo "Checking if DRBL related sevices are started or not..." + echo "Checking if DRBL related services are started or not..." # dhcpd is for isc-dhcp-server (from Squeeze), dhcpd3 is for dhcp3-server (< squeeze). dhcpd_pid="$(LC_ALL=C pidof dhcpd || LC_ALL=C pidof dhcpd3 || LC_ALL=C pidof dnsmasq)" tftpd_pid="$(LC_ALL=C pidof in.tftpd || LC_ALL=C pidof dnsmasq)" diff --git a/sbin/ocs-update-initrd b/sbin/ocs-update-initrd index 9a513c70..25b73576 100755 --- a/sbin/ocs-update-initrd +++ b/sbin/ocs-update-initrd @@ -182,7 +182,7 @@ hd_img="$(mktemp -d /tmp/hd_img.XXXXXX)" mount $grub_partition $hd_img # Check if /boot is in its own partition, if so, different mount point. -# grub root-directory must have "/boot/". If no "/boot/", it must be the grub partition itself (i.e. a separate partition will be mounted as /boot, and it conains /grub/ in the partition.) +# grub root-directory must have "/boot/". If no "/boot/", it must be the grub partition itself (i.e. a separate partition will be mounted as /boot, and it contains /grub/ in the partition.) if [ ! -d "$hd_img/boot/" ]; then # In this case, /boot must exist in its own partition, # not same partition with / (root partition). @@ -193,7 +193,7 @@ if [ ! -d "$hd_img/boot/" ]; then echo "There is a separate boot partition in target device. Trying to mount root partition for $grub_install_exec to work with that..." [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL # Important! We have to mount the root dir first. Otherwise in FC6, CentOS 5 or later, grub-install will refuse to do that without root device. It will show the error message like: "Could not find device for /mnt"... For Debian or Ubuntu, no such problem. - # Actually we can modify /sbin/grub-install (grub-0.97-13) in FC6 or Centos5: + # Actually we can modify /sbin/grub-install (grub-0.97-13) in FC6 or CentOS 5: # ----------- # ... # # Get the root drive. diff --git a/sbin/ocsmgrd b/sbin/ocsmgrd index 59c07a91..bc5941d3 100755 --- a/sbin/ocsmgrd +++ b/sbin/ocsmgrd @@ -201,7 +201,7 @@ sub start_server(%) { if ( "$config{write_pxe_cfg}" eq "0" ) { gen_pxe_cfg("$peeraddr", "$peermac"); if ( -f "$grub_conf_default" ) { - # Older GNU/Linux does not support grub2 uEFI network boot. Only doing this + # Older GNU/Linux does not support grub2 UEFI network boot. Only doing this # when $grub_conf_default exists. gen_grub_efi_cfg("$peeraddr", "$peermac", "$peerefioslable", "$peerefipart", "$peerefibootf"); } diff --git a/sbin/update-efi-nvram-boot-entry b/sbin/update-efi-nvram-boot-entry index 60ece5bb..70bb4be9 100755 --- a/sbin/update-efi-nvram-boot-entry +++ b/sbin/update-efi-nvram-boot-entry @@ -24,7 +24,7 @@ clean_nvram_unused_boot_entry="yes" # OpenSuSE 12.3: /EFI/opensuse/grubx64.efi" # MS Windows 7/8: /EFI/Boot/bootx64.efi # CentOS 7.4: /EFI/centos/grubx64.efi -# //NOTE// Rememer to sync the variable efiblfiles in /etc/drbl/boot-local-efi.cfg and drbl/conf/boot-local-efi.cfg. +# //NOTE// Remember to sync the variable efiblfiles in /etc/drbl/boot-local-efi.cfg and drbl/conf/boot-local-efi.cfg. efiblfiles="shimx64.efi shim.efi grubx64.efi grub.efi elilo.efi bootx64.efi Boot/bootmgfw.efi grubaa64.efi bootaa64.efi bootarm.efi" # Default label name label_def="OS on hard drive" @@ -188,7 +188,7 @@ check_if_nvram_efi_boot_entry_exist() { # Boot0080* ACPI(a0341d0,0)PCI(1f,2)03120a00000000000000HD(2,64028,3a1ec0c0,00006572-1fb9-0000-5d0a-000037290000)File(\System\Library\CoreServices\boot.efi) # BootFFFF* ACPI(a0341d0,0)PCI(1f,2)03120a00000000000000HD(2,64028,3a1ec0c0,00006572-1fb9-0000-5d0a-000037290000)File(\System\Library\CoreServices\boot.efi) - # The following is from the uEFI specification "3.1.1 Boot Manager Programming" + # The following is from the UEFI specification "3.1.1 Boot Manager Programming" # Each load option entry resides in a Boot#### variable or a Driver#### variable where the #### is replaced by a unique option number in printable hexadecimal representation using the digits 0–9, and the upper case versions of the characters A–F (0000–FFFF). The #### must always be four digits, so small numbers must use leading zeros # # We could use udevadm info to get the partition UUID: @@ -202,7 +202,7 @@ check_if_nvram_efi_boot_entry_exist() { # efi_system_part is global variable - # It might be duplicated uEFI boot entry in NVRAM for same ESP, just need to keep one. + # It might be duplicated UEFI boot entry in NVRAM for same ESP, just need to keep one. efi_sys_part_uuid_in_nvram="$(get_efi_hd_boot_entry_info -n $efi_system_part nvram uuid | uniq)" efi_sys_part_uuid_in_harddrive="$(get_part_uuid_in_harddrive $efi_system_part)" ret_code="" @@ -287,7 +287,7 @@ check_efi_boot_loader_file() { efi_boot_append="" dirs_list="" for idir in $mnt_pnt/EFI/*; do - # Since ESP partition is definitely a FAT partition. It's case insentive. + # Since ESP partition is definitely a FAT partition. It's case insensitive. # Hence no need to test $mnt_pnt/efi/ here or it will be duplicated. # However, later the dir name # might be uppercase or lowercase. Hence we have to use "-i" of grep or @@ -350,7 +350,7 @@ check_efi_boot_loader_file() { efi_boot_append="" dirs_list="" for idir in $mnt_pnt/EFI/*; do - # Since ESP partition is definitely a FAT partition. It's case insentive. + # Since ESP partition is definitely a FAT partition. It's case insensitive. # Hence no need to test $mnt_pnt/efi/ here or it will be duplicated. # However, later the dir name # might be uppercase or lowercase. Hence we have to use "-i" of grep or @@ -452,7 +452,7 @@ clean_unused_uefi_boot_entry_in_nvram() { local dup_bf_fp all_boot_num boot_nums_2_be_removed all_boot_num=$(get_efi_hd_boot_entry_info -a nvram boot_num) efi_tmpd="$(LC_ALL=C mktemp -d /tmp/efi_tmpd.XXXXXX)" - echo "Trying to clean unused uEFI boot entry if it exists..." + echo "Trying to clean unused UEFI boot entry if it exists..." for ib in $all_boot_num; do do_clean_EFI_boot_entry="no" efi_f="" @@ -470,7 +470,7 @@ clean_unused_uefi_boot_entry_in_nvram() { continue fi # Found EFI boot file listed in NVRAM. - # The cases for useless uEFI boot entry: + # The cases for useless UEFI boot entry: # (1) EFI boot file listed in NVRAM, but there is no such partition. # (2) EFI boot file listed in NVRAM, the partition exists, but there is no such boot file. if [ -z "$efi_part" ]; then @@ -497,7 +497,7 @@ clean_unused_uefi_boot_entry_in_nvram() { if [ -d "$efi_tmpd" ]; then rmdir $efi_tmpd fi - # Process the duplicated uEFI boot entry, just need to keep one. + # Process the duplicated UEFI boot entry, just need to keep one. dup_bf_fp="$(get_efi_hd_boot_entry_info -a nvram boot_file_full_path | sort | uniq -d)" for id in $dup_bf_fp; do all_boot_num="$(LC_ALL=C efibootmgr -v | grep -F "$id" | awk -F" " '{print $1}' | sed -r -e "s/^Boot//g" -e "s/\*$//g")" @@ -585,7 +585,7 @@ ask_and_load_lang_set $specified_lang #fi # 2019/02/16 -# Disable blacklisting Dell machine. We can avoid bricking the uEFI BIOS by newer mechanism to get only one uEFI boot label even when multiple OSs exist. Thanks to Dell US & Taiwan, and AMI Taiwan. +# Disable blacklisting Dell machine. We can avoid bricking the UEFI BIOS by newer mechanism to get only one UEFI boot label even when multiple OSs exist. Thanks to Dell US & Taiwan, and AMI Taiwan. #if check_if_dell; then # [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING # echo "Due to an issue of efibootmgr on Dell's machine, EFI NVRAM boot entry update was skipped." diff --git a/scripts/sbin/ocs-chnthn-functions b/scripts/sbin/ocs-chnthn-functions index 0b2eb306..cd807b23 100755 --- a/scripts/sbin/ocs-chnthn-functions +++ b/scripts/sbin/ocs-chnthn-functions @@ -9,7 +9,7 @@ ################################################## # -Perpare_Env(){ +Prepare_Env(){ echo -n "Checking fuse support... " # Since fuse is not always a module, we check /proc/filesystems if ! (grep -Eqw fuse /proc/filesystems) && !( modprobe fuse &> /dev/null ) ; then @@ -41,7 +41,7 @@ Usage(){ echo "Example:" echo "$0 -i : Use interactive mode " echo "$0 -b -n ntfs-3g -v IP -p MyPC : Assign hostname format like: MyPC-\$ip via using ntfs-3g tool in batch mode" - echo "$0 -b -v _fix -p HOST_101 -S : Assign fixed hostname 'HOST_101' and dotn't sync drbl-winRoll config in batch mode " + echo "$0 -b -v _fix -p HOST_101 -S : Assign fixed hostname 'HOST_101' and don't sync drbl-winRoll config in batch mode " } README(){ @@ -59,7 +59,7 @@ README(){ * ChangeLog: * * 060728 Synchronize with drbl-winRoll package configuration * Add new assignment method for fixed hostname -* Select multi-partaion if available windows root as possible in batch mode +* Select multi-partition if available windows root as possible in batch mode * Fix ntfs module loading failed * Fix mount method for different file system * Fix umount first checking @@ -110,7 +110,7 @@ Check_Package(){ done } # -# Print all hisk and partition info +# Print all disk and partition info Print_Allpartition_Info(){ local dev_list=$@ local idev diff --git a/scripts/sbin/ocs-functions b/scripts/sbin/ocs-functions index 963bb1c5..99f54f20 100755 --- a/scripts/sbin/ocs-functions +++ b/scripts/sbin/ocs-functions @@ -118,9 +118,9 @@ get_disk_from_part() { get_partition_table_type_from_disk() { local tdisk=$1 # e.g. /dev/sda local ptype - if `is_gpt_partitition_table_disk $tdisk`; then + if `is_gpt_partition_table_disk $tdisk`; then ptype="gpt" - elif `is_mbr_partitition_table_disk $tdisk`; then + elif `is_mbr_partition_table_disk $tdisk`; then ptype="mbr" else # Here we do not have to check if it's PV on a disk, because we do not need to do anything when it's "pv_disk" like that in function "get_partition_table_type_from_img". @@ -138,12 +138,12 @@ get_partition_table_type_from_img() { exit 1 fi # From the output file of parted, we can decide if the partition is gpt or mbr - if `is_gpt_partitition_table_file $img_dir_fullpath/$(to_filename ${hdsk})-pt.parted`; then + if `is_gpt_partition_table_file $img_dir_fullpath/$(to_filename ${hdsk})-pt.parted`; then ptype="gpt" - elif `is_mbr_partitition_table_file $img_dir_fullpath/$(to_filename ${hdsk})-pt.parted`; then + elif `is_mbr_partition_table_file $img_dir_fullpath/$(to_filename ${hdsk})-pt.parted`; then ptype="mbr" else - # There is still one possiblity that we need to deal with LVM, i.e. PV is not on partition, + # There is still one possibility that we need to deal with LVM, i.e. PV is not on partition, pv_on_dsk="$(get_pv_on_disk_from_PV_conf_list "$img_dir_fullpath/lvm_vg_dev.list")" for ip in $pv_on_dsk; do if [ -n "$(LC_ALL=C echo "${hdsk}" | grep -Ew "${ip}")" ]; then @@ -159,11 +159,11 @@ get_partition_table_type_from_img() { echo "$ptype" } # end of get_partition_table_type # -is_gpt_partitition_table_file() { +is_gpt_partition_table_file() { local p_table_f="$1" local rt_code="" if [ -z "$p_table_f" ]; then - echo "No input parameter \$p_table_f in function is_gpt_partitition_table!" + echo "No input parameter \$p_table_f in function is_gpt_partition_table!" return 3 fi if [ -n "$(LC_ALL=C grep -iE "^Partition Table:" $p_table_f 2>/dev/null | grep -iE "gpt")" ]; then @@ -177,13 +177,13 @@ is_gpt_partitition_table_file() { rt_code=1 fi return $rt_code -} # end of is_gpt_partitition_table_file +} # end of is_gpt_partition_table_file # -is_mbr_partitition_table_file() { +is_mbr_partition_table_file() { local p_table_f="$1" local rt_code="" if [ -z "$p_table_f" ]; then - echo "No input parameter \$p_table_f in function is_mbr_partitition_table!" + echo "No input parameter \$p_table_f in function is_mbr_partition_table!" return 3 fi if [ -n "$(LC_ALL=C grep -iE "^Partition Table:" $p_table_f 2>/dev/null | grep -iE "msdos")" ]; then @@ -197,13 +197,13 @@ is_mbr_partitition_table_file() { rt_code=1 fi return $rt_code -} # end of is_mbr_partitition_table_file +} # end of is_mbr_partition_table_file # -is_gpt_partitition_table_disk() { +is_gpt_partition_table_disk() { local input_disk_="$1" # e.g. /dev/sda local rt_code="" if [ -z "$input_disk_" ]; then - echo "No input parameter \$input_disk_ in function is_gpt_partitition_table!" + echo "No input parameter \$input_disk_ in function is_gpt_partition_table!" return 3 fi if [ -n "$(LC_ALL=C parted -s $input_disk_ print | grep -iE "^Partition Table:" | grep -iE "gpt")" ] @@ -217,7 +217,7 @@ is_gpt_partitition_table_disk() { rt_code=1 fi return $rt_code -} # end of is_gpt_partitition_table_disk +} # end of is_gpt_partition_table_disk # is_gpt_disk_with_bios_boot_part_in_legacy_bios() { # Function to test if GPT disk with a special "bios_boot" partition @@ -229,7 +229,7 @@ is_gpt_disk_with_bios_boot_part_in_legacy_bios() { echo "No input parameter \$input_disk_ in function is_gpt_disk_with_legacy_bios!" return 3 fi - if `is_gpt_partitition_table_disk $input_disk_`; then + if `is_gpt_partition_table_disk $input_disk_`; then if [ -n "$(LC_ALL=C parted -s $input_disk_ print | grep -Ew "^[[:space:]]+1[[:space:]]+.*[[:space:]]+bios_grub")" ]; then # This is the case "GPT disk" while legacy BIOS, and a special "bios_boot" partition exists. rt_code=0 @@ -246,11 +246,11 @@ is_gpt_disk_with_bios_boot_part_in_legacy_bios() { fi } # end of is_gpt_disk_with_bios_boot_part_in_legacy_bios # -is_mbr_partitition_table_disk() { +is_mbr_partition_table_disk() { local input_disk_="$1" # e.g. /dev/sda local rt_code="" if [ -z "$input_disk_" ]; then - echo "No input parameter \$input_disk_ in function is_mbr_partitition_table!" + echo "No input parameter \$input_disk_ in function is_mbr_partition_table!" return 3 fi if [ -n "$(LC_ALL=C parted -s $input_disk_ print | grep -iE "^Partition Table:" | grep -iE "msdos")" ] @@ -264,11 +264,11 @@ is_mbr_partitition_table_disk() { rt_code=1 fi return $rt_code -} # end of is_mbr_partitition_table_disk +} # end of is_mbr_partition_table_disk # wait_for_part_table_take_effect() { local dsk_=${1#/dev/*} # Input is like /dev/sda1, so dev_ becomes sda1 - # //NOTE// Some device has different format, like disk: /dve/nvme0n1 partition: /dve/nvme0n1p1 + # //NOTE// Some device has different format, like disk: /dev/nvme0n1 partition: /dev/nvme0n1p1 for i in `seq 1 50`; do echo -n "." sleep 0.2 @@ -681,7 +681,7 @@ get_part_vol_name() { local part_w="$1" # part_w is like: /dev/sda1 local part_f="$2" local part_v - # If no device or file system (possible, only partition is created, not formated), we should not give any error message in stdin. Otherwise it will become the part_v to be returned. + # If no device or file system (possible, only partition is created, not formatted), we should not give any error message in stdin. Otherwise it will become the part_v to be returned. if [ -z "$part_w" ]; then return 1 fi @@ -764,7 +764,7 @@ get_random_time() { # Found ip, ocs_server, mac, we can notify ocs server # To avoid all the clients notify at almost same time, we use random sleep before send info. # Ref: http://www.faqs.org/docs/abs/HTML/randomvar.html - # We need extra uniq seed number, otherwise all the clients boot at same time, same boot sqeuence, will have same Unix time, PID, PPID... then the random will be the same. + # We need extra uniq seed number, otherwise all the clients boot at same time, same boot sequence, will have same Unix time, PID, PPID... then the random will be the same. # "ifconfig -a" will give the uniq value, since it contains uniq IP address and MAC address. # "$RANDOM" is bash built-in random number, Nominal range: 0 - 32767 (signed 16-bit integer). # NOTE: ran0: max 10 digits; ran1: max 5 digits, we want ran1 in the order 0-100, so /1000.0 @@ -1179,7 +1179,7 @@ output_swap_partition_uuid_label() { UUID="" LABEL="" . $blkinfo - [ -z "$UUID" -a -z "$LABEL" ] && echo "Warning! UUID and LABLE of swap dev $swap_dev are nothing!" + [ -z "$UUID" -a -z "$LABEL" ] && echo "Warning! UUID and LABEL of swap dev $swap_dev are nothing!" echo "UUID=\"$UUID\"" > $output_swap_info echo "LABEL=\"$LABEL\"" >> $output_swap_info [ -e "$blkinfo" ] && rm -f $blkinfo @@ -1274,14 +1274,14 @@ save_part_by_ntfsclone() { tee $ntfs_img_info_tmp rc="$?" end_time="$(date +%s%N)" - # UGLY! Since we use ntfsclone, then pipe to compression program, then IO redirect to file, the error control is weak. ntfsclone wil not exit even if the disk is full. Therefore we check here. + # UGLY! Since we use ntfsclone, then pipe to compression program, then IO redirect to file, the error control is weak. ntfsclone will not exit even if the disk is full. Therefore we check here. echo "Checking the disk space... " && disk_full_test $image_name_ "The saved image file $tgt_dir/${tgt_file}.ntfs-img is incomplete! You have to increase the disk space, then start clonezilla save mode again." get_ntfs_image_info $ntfs_img_info_tmp $start_time $end_time # no preparation time, it's accurate enough. echo ">>> Time elapsed: $time_elapsed secs (~ $time_elapsed_in_min mins), average speed: $speed" [ -e "$ntfs_img_info_tmp" ] && rm -f $ntfs_img_info_tmp # For better security - set_acess_mode_for_img "$tgt_dir/${tgt_file}.ntfs-img*" + set_access_mode_for_img "$tgt_dir/${tgt_file}.ntfs-img*" # prepare statistic report conv_return_code_to_human_read $rc report_msg="$report_msg $source_dev, $clone_status, $space_used, $time_elapsed_in_min mins, $speed;" @@ -1448,7 +1448,7 @@ save_part_by_partclone() { cat $img_out_err | tee --append ${OCS_LOGFILE} fi rm -f $img_out_err - # UGLY! Since we use partclone, then pipe to compression program, then IO redirect to file, the error control is weak. partclone wil not exit even if the disk is full. Therefore we check here. + # UGLY! Since we use partclone, then pipe to compression program, then IO redirect to file, the error control is weak. partclone will not exit even if the disk is full. Therefore we check here. echo "Checking the disk space... " && disk_full_test $image_name_ "The saved image file $tgt_dir/$(to_filename ${tgt_file}).${fs_pre}-img.${comp_suf} is incomplete. You have to increase the disk space, then start clonezilla save mode again." get_partclone_image_info $partclone_img_info_tmp $start_time $end_time [ $rc -eq 0 ] && rc=$? @@ -1456,7 +1456,7 @@ save_part_by_partclone() { # no preparation time, it's accurate enough. echo ">>> Time elapsed: $time_elapsed secs (~ $time_elapsed_in_min mins)" | tee --append ${OCS_LOGFILE} # For better security - set_acess_mode_for_img "$tgt_dir/$(to_filename ${tgt_file}).${fs_pre}-img.${comp_suf}*" + set_access_mode_for_img "$tgt_dir/$(to_filename ${tgt_file}).${fs_pre}-img.${comp_suf}*" else if ls $tgt_dir/$(to_filename ${tgt_file}).${fs_pre}-img.${comp_suf}* &>/dev/null; then rm -f $tgt_dir/$(to_filename ${tgt_file}).${fs_pre}-img.${comp_suf}* @@ -1477,7 +1477,7 @@ save_part_by_partimage() { # case (2): partimage supported filesystem, we can use partimage to save it. # Use partimage and stdout pipe to lzop, gzip, bzip2 # Since partimage does not support lzo, we use pipe to lzop the image, and this is a good approach. So use it for gzip, bzip2, too. i.e. do not let partimage to do gzip/bzip2/lzop, use external program. - # partiamge will use the NO-GUI mode. When using pipe stdout, --volume=0 is a must. Otherwise it will create a file like stdout.000... + # partimage will use the NO-GUI mode. When using pipe stdout, --volume=0 is a must. Otherwise it will create a file like stdout.000... # The basic idea is to use partimage, but compression is made by other program with pipe, so use -z0 in partimage. -z0 and --volume=0 are already assigned in drbl-ocs.conf # # Check the Blocks per group of ext2/ext3 is 32768 or not. If not, partimage does not support. Exit. Ref: http://sourceforge.net/forum/forum.php?thread_id=1833628&forum_id=663168 @@ -1523,7 +1523,7 @@ save_part_by_partimage() { calculate_elapsed_time $start_time $end_time echo ">>> Time elapsed: $time_elapsed secs (~ $time_elapsed_in_min mins)" | tee --append ${OCS_LOGFILE} # For better security - set_acess_mode_for_img "$tgt_dir/${tgt_file}*" + set_access_mode_for_img "$tgt_dir/${tgt_file}*" # prepare statistic report conv_return_code_to_human_read $rc report_msg="$report_msg $source_dev, $clone_status, $time_elapsed_in_min mins;" @@ -1559,7 +1559,7 @@ save_part_by_dd() { [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_fs_not_supported_by_partimage_ntfsclone: $part_fs" | tee --append ${OCS_LOGFILE} echo "$msg_cons_for_dd_clone" | tee --append ${OCS_LOGFILE} - echo "$msg_will_be_inefficent_and_slow..." + echo "$msg_will_be_inefficient_and_slow..." case "$s2s_img_prog_for_save" in dd) echo "$msg_use_this_method_to_save_img: dd + $compress_prog_prompt" | tee --append ${OCS_LOGFILE} @@ -1631,8 +1631,8 @@ save_part_by_dd() { kill -9 $dd_report_sig_pid &>/dev/null # save the size so that when we restore the image, partition size can be shown in the status report. This is better than to get partition info from *-pt.sf (which is shown in sectors, not absolute value) or uncompress *.dd-img then get the partition info in the loop device file (not efficient). echo "$part_size" > $tgt_dir/$(to_filename ${tgt_file})-size - # UGLY! Since we use dd, then pipe to compression program, then IO redirect to file, the error control is weak. dd wil not exit even if the disk is full. Therefore we check here. - echo "Checking the disk space... " && disk_full_test $image_name_ "The saved image file $tgt_dir/$(to_filename ${tgt_file}).dd-img is incomplete. You have to increase the disk space, then start Clonzilla save mode again." + # UGLY! Since we use dd, then pipe to compression program, then IO redirect to file, the error control is weak. dd will not exit even if the disk is full. Therefore we check here. + echo "Checking the disk space... " && disk_full_test $image_name_ "The saved image file $tgt_dir/$(to_filename ${tgt_file}).dd-img is incomplete. You have to increase the disk space, then start Clonezilla save mode again." get_dd_image_info $dd_img_info_tmp $start_time $end_time [ $rc -eq 0 ] && rc=$? [ -e "$dd_img_info_tmp" ] && rm -f $dd_img_info_tmp @@ -1674,7 +1674,7 @@ save_part_by_dd() { fi rm -f $img_out_err # sync_and_active_exec_files - # UGLY! Since we use partclone, then pipe to compression program, then IO redirect to file, the error control is weak. partclone wil not exit even if the disk is full. Therefore we check here. + # UGLY! Since we use partclone, then pipe to compression program, then IO redirect to file, the error control is weak. partclone will not exit even if the disk is full. Therefore we check here. echo "Checking the disk space... " && disk_full_test $image_name_ "The saved image file $tgt_dir/$(to_filename {tgt_file}).dd-img is incomplete! You have to increase the disk space, then start clonezilla save mode again." get_partclone_image_info $partclone_img_info_tmp $start_time $end_time [ $rc -eq 0 ] && rc=$? @@ -1685,7 +1685,7 @@ save_part_by_dd() { # no preparation time, it's accurate enough. echo ">>> Time elapsed: $time_elapsed secs (~ $time_elapsed_in_min mins)" | tee --append ${OCS_LOGFILE} # For better security - set_acess_mode_for_img "$tgt_dir/$(to_filename ${tgt_file}).dd-img*" + set_access_mode_for_img "$tgt_dir/$(to_filename ${tgt_file}).dd-img*" else if ls $tgt_dir/$(to_filename ${tgt_file}).dd-img* &>/dev/null; then rm -f $tgt_dir/$(to_filename ${tgt_file}).dd-img* @@ -2121,8 +2121,8 @@ conv_uuid_mount_to_tradpart() { # get_known_partition_proc_format() { # input param, [harddisk|partition] - # To specify it's hardisk or partition - # return the hardisks or partitions + # To specify it's harddisk or partition + # return the harddisks or partitions # BACKUP_DEVS is a global variable # Return the results to variable $BACKUP_DEVS @@ -2158,7 +2158,7 @@ get_known_partition_proc_format() { echo -n "Collecting info." for p in $dev_list; do # Skip swap and extended partition - # We do not use the output of fdisk -l, it's type mabe like Extended, Ext'd, it's not easy to tell... We do not use file to get the partition type, either, since in newer version (e.g. in Debian lenny) it won't show anything about extended. + # We do not use the output of fdisk -l, it's type maybe like Extended, Ext'd, it's not easy to tell... We do not use file to get the partition type, either, since in newer version (e.g. in Debian lenny) it won't show anything about extended. echo -n "." part_type="$(LC_ALL=C ocs-get-dev-info "/dev/$p" type filesystem 2>/dev/null | sort)" rc=$? @@ -2311,7 +2311,7 @@ mount_root_partition_for_separate_boot_part() { done # Try LVM2 if no root partition is found if [ -z "$found_root_partition" ]; then - # Froce to start LVM devices so that they will be shown in /proc/partitions ad dm-* + # Force to start LVM devices so that they will be shown in /proc/partitions ad dm-* ocs-lvm2-start lvm_list="$(LC_ALL=C awk '/dm-[0-9]+/ { print $4; }' $partition_table | sort)" if [ -n "$lvm_list" ]; then @@ -2976,7 +2976,7 @@ load_HD_geometry_opt_from_image() { no_CHS_data_warning() { [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "Unable to find the previous saved file $target_d/$(to_filename ${DEV})-chs.sf." - echo "Maybe the image is created by old verson clonezilla." + echo "Maybe the image is created by old version clonezilla." echo "We will not force to use the specified HD geometry." [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL } @@ -2993,7 +2993,7 @@ load_HD_geometry_opt_from_image() { } # end of load_HD_geometry_opt_from_image # clean_cylinder_boundary_warning() { - # We have to clean this two warnings, otherwise sfdisk will refuce to write + # We have to clean this two warnings, otherwise sfdisk will refuse to write # even if we run something like: # sfdisk --force -C# -H# -S# /dev/hda < hda-pt.sf... # //NOTE// Here we only run perl after grep finds the words we want to replace. Otherwise even if it's empty, once perl is run the original file still will be processed, and some version of perl, like 5.10.1-17 in Debian Squeeze, will create a temp file like ".nfs0000000096af2bf700000013" in the image dir, and it won't be removed after it's run. @@ -3077,7 +3077,7 @@ check_integrity_of_partition_table_in_disk() { # False alarm. return 0 fi - # There is still one possiblity that we need to deal with LVM, i.e. PV is not on partition, + # There is still one possibility that we need to deal with LVM, i.e. PV is not on partition, pv_on_dsk="$(get_pv_on_disk_from_local_machine)" pv_on_dsk_flag="false" for ip in $pv_on_dsk; do @@ -3262,7 +3262,7 @@ clean_mbr_gpt_part_table() { # create_mbr_partition_table() { local opt_wm sfdisk_cmd_mbr - # From use_HD_CHS_from_EDD_pref we will decide if use_HD_CHS_from_EDD is yes or no. The rule is if we find the target disk does _NOT_ contain grub boot loader, set use_HD_CHS_from_EDD as yes, others, set it as no. This is because we will re-run grub-install by deafult. + # From use_HD_CHS_from_EDD_pref we will decide if use_HD_CHS_from_EDD is yes or no. The rule is if we find the target disk does _NOT_ contain grub boot loader, set use_HD_CHS_from_EDD as yes, others, set it as no. This is because we will re-run grub-install by default. if [ "$use_HD_CHS_from_EDD_pref" = "yes" ]; then if [ -z "$(LC_ALL=C strings $tgt_dir/$(to_filename ${tgt_hd_name})-mbr | grep -i "grub")" ] then @@ -3296,7 +3296,7 @@ create_mbr_partition_table() { fi fi # If the partition table is tag as "gpt", change it as msdos - if `is_gpt_partitition_table_disk $tgt_hd_file`; then + if `is_gpt_partition_table_disk $tgt_hd_file`; then echo "The partition table in $tgt_hd_file is for GPT, now make it for MBR." | tee --append $OCS_LOGFILE echo "Running: parted -s $tgt_hd_file mklabel msdos" | tee --append $OCS_LOGFILE LC_ALL=C parted -s $tgt_hd_file mklabel msdos | tee --append $OCS_LOGFILE @@ -3333,7 +3333,7 @@ create_mbr_partition_table() { fi ;; y|Y|[yY][eE][sS]) - # Sfdisk >= 0.26 has option --wipe, we should use it to avoid confliction + # Sfdisk >= 0.26 has option --wipe, we should use it to avoid conflicting opt_wm="" if [ -n "$(LC_ALL=C sfdisk --help 2>&1 | grep -Ew -- "--wipe")" ]; then opt_wm="--wipe always" @@ -3395,10 +3395,10 @@ create_mbr_partition_table() { esac ;; esac - # Due to some reason, although LVM was deactived before we ran sfdisk, "sfdisk --force..." might cause LVM to active again. Therefore we have to deactive and run "blockdev --rereadpt..." to make the kernel know the new partition table again. + # Due to some reason, although LVM was deactivated before we ran sfdisk, "sfdisk --force..." might cause LVM to active again. Therefore we have to deactivated and run "blockdev --rereadpt..." to make the kernel know the new partition table again. echo $msg_delimiter_star_line if [ -n "$(LC_ALL=C lvscan | grep -Ewi "ACTIVE")" ]; then - echo "LV is still active, try to deactive it..." + echo "LV is still active, try to deactivate it..." ocs-lvm2-stop fi inform_kernel_partition_table_changed mbr $tgt_hd_file | tee --append ${OCS_LOGFILE} @@ -3411,15 +3411,15 @@ create_gpt_partition_table() { # Before really create partition table, we should do some tasks... clean_mbr_partition_table_before_gen_gpt_table $tgt_hd_file - # Due to some reason, although LVM was deactived before we ran sfdisk, "sfdisk --force..." might cause LVM to active again. Therefore we have to deactive and run "blockdev --rereadpt..." to make the kernel know the new partition table again. + # Due to some reason, although LVM was deactivated before we ran sfdisk, "sfdisk --force..." might cause LVM to active again. Therefore we have to deactivate and run "blockdev --rereadpt..." to make the kernel know the new partition table again. echo $msg_delimiter_star_line if [ -n "$(LC_ALL=C lvscan | grep -Ewi "ACTIVE")" ]; then - echo "LV is still active, try to deactive it..." + echo "LV is still active, try to deactivate it..." ocs-lvm2-stop fi create_gpt_table_if_no_table $tgt_hd_file - # Sfdisk >= 0.26 has option --wipe, we should use it to avoid confliction + # Sfdisk >= 0.26 has option --wipe, we should use it to avoid conflicting opt_wm="" if [ -n "$(LC_ALL=C sfdisk --help 2>&1 | grep -Ew -- "--wipe")" ]; then opt_wm="--wipe always" @@ -3543,7 +3543,7 @@ create_gpt_partition_table() { fi # Somehow "sgdisk -l" (<= version 0.8.4) does not create protective MBR, either. Therefore we have to use the following workaround to write it again. if [ -n "$(LC_ALL=C parted -s $tgt_hd_file print | grep -i "it does not have a valid fake msdos partition table" )" ]; then - # FixME. In the future if sgdisk supports an option to do this, we should swith to use sgdisk instead of gdisk+expect. + # FixME. In the future if sgdisk supports an option to do this, we should switch to use sgdisk instead of gdisk+expect. sleep 1 LC_ALL=C echo "spawn gdisk $tgt_hd_file; expect Command; send wq\r; expect \"Do you want to proceed? (Y/N)\"; send Y\r; expect eof" | expect -f - fi @@ -3888,7 +3888,7 @@ task_processing_after_parameters_checked() { fi # Check the image if restorable for restoring mode. - if [ "$chk_img_restoreable_mod_restore" = "yes" -a -d "$ocsroot/$target_dir" ]; then + if [ "$chk_img_restorable_mod_restore" = "yes" -a -d "$ocsroot/$target_dir" ]; then # To avoid the /var/lib/clonezilla/ocs-vars is overwritten by ocs-chkimg, backup it first. if [ -e /var/lib/clonezilla/ocs-vars ]; then mv -f /var/lib/clonezilla/ocs-vars /var/lib/clonezilla/ocs-vars.before-ocs-chkimg @@ -3963,7 +3963,7 @@ task_postprocessing() { # (1) Change the hostname of MS Windows in the restored machine # (2) Restore the inittab so that if ocsmgrd fails to get the message, the client will not clone again. # (3) Restore the udevd rules (if exists) which were disabled by ocs-lvm2-stop. - # (4) Unmount NFS mounting poing if $mount_point exists + # (4) Unmount NFS mounting point if $mount_point exists # (5) Enter debug mode if assigned # (6) Notify the server if necessary # (7) Output a file name to tag the image and put the log for saving the image @@ -4048,7 +4048,7 @@ task_postprocessing() { echo "IMG_ID=$(LC_ALL=C sha512sum $img_dir/clonezilla-img | awk -F" " '{print $1}')" >> $img_dir/Info-img-id.txt # Check the saved image before unmounting the encrypted image - if [ "$chk_img_restoreable_mod_save" = "yes" ]; then + if [ "$chk_img_restorable_mod_save" = "yes" ]; then if [ "$ocs_sr_type" = "savedisk" -a "x$rc_savedisk" = "x0" ] || [ "$ocs_sr_type" = "saveparts" -a "x$rc_saveparts" = "x0" ]; then # To avoid the /var/lib/clonezilla/ocs-vars is overwritten by ocs-chkimg, backup it first. @@ -4324,7 +4324,7 @@ get_input_image_name() { fi done [ -f "$TMP" ] && rm -f $TMP - # return the valule + # return the value echo $tgt_img_name > $ANS_TMP } # end of get_input_image_name # @@ -4383,7 +4383,7 @@ get_disk_or_part_hardware_info() { if is_partition "$p"; then # Partition # Skip swap and extended partition - # We do not use the output of fdisk -l, it's type mabe like + # We do not use the output of fdisk -l, it's type maybe like # Extended, Ext'd, it's not easy to tell... We use file to get the # partition type echo "Getting /dev/$p info..." @@ -4621,7 +4621,7 @@ get_not_busy_disks_or_parts() { # Two cases: # (1) Remove busy partitions (hence those busy disks, like sda1 busy, so sda is busy, too) - # (2) Remove busy disks (disk as block device contains file system, e.g. /dev/sdc is formated with ext4) + # (2) Remove busy disks (disk as block device contains file system, e.g. /dev/sdc is formatted with ext4) # E.g., $mounted_table now has the following busy devices: # loop0 # nvme0n1p1 @@ -4684,8 +4684,8 @@ get_not_busy_disks_or_parts() { # get_input_dev_name() { # input param, [harddisk|partition] - # To specify it's hardisk or partition - # return the hardisks or partitions + # To specify it's harddisk or partition + # return the harddisks or partitions # Note!!! We must use common tmp file to pass the result, we can not # just echo result in the end of this function. Otherwise in newer # dialog (FC3), the script will wait for the end of function, then it @@ -4924,7 +4924,7 @@ get_existing_hda1_image() { [ "$file" = "$imagedir/ocsmgrd" ] && continue [ "$file" = "$imagedir/size" ] && continue - ## Blake, 2005/01/20, backward compability .. + ## Blake, 2005/01/20, backward compatibility .. if [ ! -d $file ]; then imgf="${file/\.000/}" for imgff in $imgf.*; do @@ -4941,9 +4941,9 @@ get_existing_hda1_image() { echo "$numfiles. $filename $fileinfo" >> $TMP numfiles=`expr $numfiles + 1` done - ## Blake, 2005/01/20, backward compability + ## Blake, 2005/01/20, backward compatibility if [ "$(wc -l $OLDVERTMP | awk -F " " '{print $1}')" != "0" ]; then - echo "To make it compatble with the new clonezilla," + echo "To make it compatible with the new clonezilla," echo "we have to move some of the old partimage files into directories." echo "The following partimage files are moving:" while read from to; do echo " $from -> $to"; done < $OLDVERTMP @@ -4977,7 +4977,7 @@ get_existing_hda1_image() { fi [ -f "$TMP" ] && rm -f $TMP [ -f "$OLDVERTMP" ] && rm -f $OLDVERTMP - # return the valule + # return the value echo $tgt_file > $ANS_TMP } # end of get_existing_hda1_image # @@ -5081,7 +5081,7 @@ get_existing_disk_image() { exit 1 fi [ -f "$TMP" ] && rm -f $TMP - # return the valule + # return the value echo $tgt_file > $ANS_TMP } # end of get_existing_disk_image @@ -5180,7 +5180,7 @@ get_existing_parts_image() { exit 1 fi [ -f "$TMP" ] && rm -f $TMP - # return the valule + # return the value echo $tgt_file > $ANS_TMP } # end of get_existing_parts_image # @@ -5234,7 +5234,7 @@ get_existing_disks_from_img() { exit 1 fi [ -f "$TMP" ] && rm -f $TMP - # return the valule + # return the value echo $tgt_disks > $ANS_TMP # strip the unnecessary quotation mark " LC_ALL=C perl -pi -e "s/\"//g" $ANS_TMP @@ -5803,7 +5803,7 @@ unicast_restore_by_dd() { [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_image_saved_from_dd" echo "$msg_cons_for_dd_clone" - echo "$msg_will_be_inefficent_and_slow..." + echo "$msg_will_be_inefficient_and_slow..." if [ "$S2S_IMAGE_PROG_IN_OCS" = "dd" ]; then echo "$msg_status_report_is_very_primitive..." fi @@ -6018,7 +6018,7 @@ multicast_restore_by_partclone() { # No matter it split or not, ${file_basename} or ${file_} can be .aa file or the single image itself. We only need one file to test. # Since server will feed the image, therefore here we do not have to prepare a variable "$img_file_prefix" like that in function unicast_restore_by_partclone if [ -n "$(echo "$file_basename" | grep -Eo -- "-ptcl-img")" ]; then - # New format, decide by file name, so we do not have to include dir name. It's better to do so since maybe user will assing a image name (dir name) with the "magic" keyword in a coincidence + # New format, decide by file name, so we do not have to include dir name. It's better to do so since maybe user will assign a image name (dir name) with the "magic" keyword in a coincidence get_image_cat_zip_cmd ${file_basename} else # Old format, since it's tested by command "file -Ls", we need the absolute path so file command can access it. @@ -6083,7 +6083,7 @@ multicast_restore_by_dd() { [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_image_saved_from_dd" echo "$msg_cons_for_dd_clone" - echo "$msg_will_be_inefficent_and_slow..." + echo "$msg_will_be_inefficient_and_slow..." if [ "$S2S_IMAGE_PROG_IN_OCS" = "dd" ]; then echo "$msg_status_report_is_very_primitive..." fi @@ -6724,10 +6724,10 @@ do_d2d_local_restore() { [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "No file system was found in /dev/$src_d!" | tee --append $OCS_LOGFILE [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL - local_partition_to_partiton_clone dd /dev/$src_d /dev/$tgt_d + local_partition_to_partition_clone dd /dev/$src_d /dev/$tgt_d # Unknown file system, no way to mount to inspect the checksum. Skip it here. else - local_partition_to_partiton_clone $part_fs /dev/$src_d /dev/$tgt_d + local_partition_to_partition_clone $part_fs /dev/$src_d /dev/$tgt_d if [ "$chksum_for_files_in_dev" = "yes" ]; then echo $msg_delimiter_star_line | tee --append ${OCS_LOGFILE} inspect_chksum_for_files_in_dev /dev/$tgt_d "$target_d" @@ -7351,7 +7351,7 @@ feed_bittorrent_LVM() { local btl_cmd local fn local track_max_client_opt from_rawdev_opt - # lv_list_bt is gloable variable + # lv_list_bt is global variable while [ $# -gt 0 ]; do case "$1" in -f|--from-raw-dev) @@ -7613,7 +7613,7 @@ start_ocsmgrd_daemon() { kill_ps_by_killall_9 ocsmgrd [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING - echo "The status recevied by ocsmgrd will be saved to $ocs_log_dir/ocsmgrd-notify.log." + echo "The status received by ocsmgrd will be saved to $ocs_log_dir/ocsmgrd-notify.log." [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL ocs_log_rotate $ocs_log_dir/ocsmgrd-notify.log nohup sh -c "ocsmgrd $mgrd_opt 2>&1 | tee -a $ocs_log_dir/ocsmgrd-notify.log" & @@ -7802,7 +7802,7 @@ start_ocs_service() { add_runlevel_1_in_grub_efi_cfg_block clonezilla-se-client fi - # If the mode is in always_restore, and PXE default menu is assigned to local (-y0), we will set local boot as default. Since the always_restore mode is only useful with local OS exists. But if in some scenario, such as production clone flow, maybe pxe_menu_default_mode=clone is useful, since a lot of hardisks will be replaced one by one. + # If the mode is in always_restore, and PXE default menu is assigned to local (-y0), we will set local boot as default. Since the always_restore mode is only useful with local OS exists. But if in some scenario, such as production clone flow, maybe pxe_menu_default_mode=clone is useful, since a lot of harddisks will be replaced one by one. if [ "$always_restore" = "yes" ]; then case "$pxe_menu_default_mode" in "local") @@ -8016,7 +8016,7 @@ prep_client_inittab_rc_srv() { if [ "$rc_task" = "select_in_client" ]; then # reset these variables, we just want to run "/usr/sbin/clonezilla" only - # skip prep ocsroot (clonezilla iamge home), since it's in DRBL environment, the ocsroot is mounted by NFS already. + # skip prep ocsroot (clonezilla image home), since it's in DRBL environment, the ocsroot is mounted by NFS already. # Note! OCS_OPT should not use -s/-S/-a/-b/-z/0-6 # because: /sbin/init [ -a ] [ -s ] [ -b ] [ -z xxx ] [ 0123456Ss ] # The OCS_OPT is passed to program "/usr/sbin/clonezilla", not ocs-sr. @@ -8292,7 +8292,7 @@ get_target_device_name_from_local_machine() { } # end of get_target_device_name_from_local_machine # get_target_dir_name_when_restoring_disk() { - # target_dir and ocsroot are gloable variables + # target_dir and ocsroot are global variables local ANS_TMP ANS_TMP=`mktemp /tmp/ocs_ans.XXXXXX` trap "[ -f "$ANS_TMP" ] && rm -f $ANS_TMP" HUP INT QUIT TERM EXIT @@ -8301,12 +8301,12 @@ get_target_dir_name_when_restoring_disk() { # Note! We won't add leading $ocsroot in $target_dir, because when task_saveparts do the real job later, it will add that. target_dir="$(cat $ANS_TMP)" [ -e "$ANS_TMP" ] && rm -f $ANS_TMP - # conver the clonezilla format for 1.x to 2.x if necessary + # convert the clonezilla format for 1.x to 2.x if necessary convert_ocs_format_from_1.5_to_2.0_or_newer $ocsroot/$target_dir/ } # end of get_target_dir_name_when_restoring_disk # get_target_dir_name_when_restoring_parts() { - # target_dir and ocsroot are gloable variables + # target_dir and ocsroot are global variables local ANS_TMP ANS_TMP=`mktemp /tmp/ocs_ans.XXXXXX` trap "[ -f "$ANS_TMP" ] && rm -f $ANS_TMP" HUP INT QUIT TERM EXIT @@ -8318,12 +8318,12 @@ get_target_dir_name_when_restoring_parts() { # target_image is an important global variable, it's related to the PXE menu tag, and some other important thing. target_image="$target_dir" [ -e "$ANS_TMP" ] && rm -f $ANS_TMP - # conver the clonezilla format for 1.x to 2.x if necessary + # convert the clonezilla format for 1.x to 2.x if necessary convert_ocs_format_from_1.5_to_2.0_or_newer $ocsroot/$target_dir/ } # end of get_target_dir_name_when_restoring_parts # get_target_dir_name_when_checking_img_restorable() { - # target_dir and ocsroot are gloable variables + # target_dir and ocsroot are global variables local ANS_TMP ANS_TMP=`mktemp /tmp/ocs_ans.XXXXXX` trap "[ -f "$ANS_TMP" ] && rm -f $ANS_TMP" HUP INT QUIT TERM EXIT @@ -8338,7 +8338,7 @@ get_target_dir_name_when_checking_img_restorable() { } # end of get_target_dir_name_when_checking_img_restorable # get_target_dir_name_when_converting_img() { - # target_dir and ocsroot are gloable variables + # target_dir and ocsroot are global variables local ANS_TMP local only_type # Available types: p2v, enc (encrypted image), nonenc (non-encrypted image) # @@ -8379,7 +8379,7 @@ get_target_dir_name_when_converting_img() { } # end of get_target_dir_name_when_converting_img # get_target_dir_name_when_checking_img_checksum() { - # target_dir and ocsroot are gloable variables + # target_dir and ocsroot are global variables local ANS_TMP ANS_TMP=`mktemp /tmp/ocs_ans.XXXXXX` trap "[ -f "$ANS_TMP" ] && rm -f $ANS_TMP" HUP INT QUIT TERM EXIT @@ -8457,7 +8457,7 @@ create_temp_image_for_different_target_dev_name_if_necessary() { # Some cases not supported: # (1) Multicast clone. # (2) Unicast clone with batch mode (Since maybe there will be more than 1 restoration, and they will create the same temp image, which will be in a mess. - # (3) source hardisk number is >= 2 + # (3) source harddisk number is >= 2 # for BT, the port is assigned as "bt" from ocs-sr # for d2d, the port is assigned as "bt" from ocs-sr if [ -n "$port" -a "$port" != "bt" -a "$port" != "ld2d" -a "$port" != "nd2d" ]; then @@ -8646,7 +8646,7 @@ task_savedisk() { target_hd="$(cat $ANS_TMP | tr -d \")" [ -f "$ANS_TMP" ] && rm -f $ANS_TMP - # We need the partition table to conver the selected HD to partitions. + # We need the partition table to convert the selected HD to partitions. target_parts="" target_swap_parts="" target_extended_parts="" @@ -8665,7 +8665,7 @@ task_savedisk() { rm -f $part_rec_f fi - # There is still one possiblity that we need to deal with LVM, i.e. PV is not on partition, + # There is still one possibility that we need to deal with LVM, i.e. PV is not on partition, # instead it's on a disk (e.g. /dev/sdb). pv_on_dsk="$(get_pv_on_disk_from_local_machine)" # pv_on_dsk: sda, sdb... for ip in $pv_on_dsk; do @@ -8835,7 +8835,7 @@ save_part_table_mbr_dm_info(){ # From the output file of parted, we can decide if the partition is gpt or mbr # //NOTE// Here we can not use function "get_partition_table_type_from_img" # because the image is not created completely yet. - if `is_gpt_partitition_table_file $target_dir_fullpath/$(to_filename ${ihd})-pt.parted`; then + if `is_gpt_partition_table_file $target_dir_fullpath/$(to_filename ${ihd})-pt.parted`; then if [ "$RETVAL" -ne 0 ]; then # sfdisk failed to save the partition table [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE @@ -8878,7 +8878,7 @@ save_part_table_mbr_dm_info(){ fi # Save Veracrypt volume header if required. ocs-save-veracrypt-vh /dev/$ihd $target_dir_fullpath - elif `is_mbr_partitition_table_file $target_dir_fullpath/$(to_filename ${ihd})-pt.parted`; then + elif `is_mbr_partition_table_file $target_dir_fullpath/$(to_filename ${ihd})-pt.parted`; then if [ "$RETVAL" -ne 0 ]; then # sfdisk failed to save the partition table [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE @@ -8923,7 +8923,7 @@ save_part_table_mbr_dm_info(){ else # Disk with no GPT or MBR partition. # In this case, sfdisk should fail to save the partition table, but if PV on a disk, not partition. - # There is still one possiblity that we need to deal with LVM, i.e. PV is not on partition, + # There is still one possibility that we need to deal with LVM, i.e. PV is not on partition, pv_on_dsk="$(get_pv_on_disk_from_local_machine)" pv_on_dsk_flag="false" for ip in $pv_on_dsk; do @@ -8971,7 +8971,7 @@ task_saveparts() { local pv_on_dsk pv_on_dsk_flag local ask_luks_flag enable_luks_ans local lks_open_cmd clted_luks_devs clted_luks_devs_map_sv lkuuid - # enable_luks is a global vaariable + # enable_luks is a global variable # target_hd will be extracted from $target_parts, maybe we will have one more local target_hd="" @@ -9065,7 +9065,7 @@ task_saveparts() { # Create the image directory mkdir -p $target_dir_fullpath - # Save multipath infomation file + # Save multipath information file if ls ${MULTIPATH_INFODIR}/*-multipath >/dev/null 2>&1; then cp -f ${MULTIPATH_INFODIR}/*-multipath $target_dir_fullpath fi @@ -9146,7 +9146,7 @@ task_saveparts() { if [ -z "$lks_dev_map" ]; then [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_luks_mapped_name_not_found_in_this_file: $target_dir_fullpath/luks-crypttab-from-OS.info." - echo "$msg_name_it_arbitrarily_restered_os_boot_might_fail" + echo "$msg_name_it_arbitrarily_restored_os_boot_might_fail" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL countdown 5 echo @@ -9185,7 +9185,7 @@ task_saveparts() { # not LVM or LUKS, normal partition image_save /dev/$partition $target_dir_fullpath $partition rc_savepts="$(($rc_savepts + $?))" - # Tag the partition info. This is special for NTFS boot reserved partiition + # Tag the partition info. This is special for NTFS boot reserved partition rc_boot_reserve="" check_if_windows_boot_reserve_part /dev/$partition rc_boot_reserve="$?" @@ -9194,7 +9194,7 @@ task_saveparts() { fi done - # There is still one possiblity that we need to deal with LVM, i.e. PV is not on partition, + # There is still one possibility that we need to deal with LVM, i.e. PV is not on partition, # instead it's on a disk (e.g. /dev/sdb). # Although there is a checking in task_savedisk function, but this is for "saveparts" option. pv_on_dsk="$(get_pv_on_disk_from_local_machine)" # pv_on_dsk: sda, sdb... @@ -9319,7 +9319,7 @@ task_restoredisk() { done done - # There is still one possiblity that we need to deal with LVM, i.e. PV is not on partition, + # There is still one possibility that we need to deal with LVM, i.e. PV is not on partition, # instead it's on a disk (e.g. /dev/sdb). pv_on_dsk="$(get_pv_on_disk_from_PV_conf_list "$ocsroot/$target_dir/lvm_vg_dev.list")" for ip in $pv_on_dsk; do @@ -9364,7 +9364,7 @@ task_multicast_restoredisk() { # e.g., check_md5sum="no" eval check_${imtd}="no" done - # To do backward compatability, we still keep task_multicast_restoredisk function, but let task_restoredisk do the real job. + # To do backward compatibility, we still keep task_multicast_restoredisk function, but let task_restoredisk do the real job. task_restoredisk "$target_dir" "$target_hd" "$port" } # end of task_multicast_restoredisk @@ -9401,7 +9401,7 @@ task_bt_restoreparts() { # e.g., check_md5sum="no" eval check_${imtd}="no" done - # To do backward compatability, we still keep task_bt_restoreparts function, but let task_restoreparts do the real job. + # To do backward compatibility, we still keep task_bt_restoreparts function, but let task_restoreparts do the real job. task_restoreparts "$target_dir" "$target_parts" "$port" } # end of task_bt_restoreparts # @@ -9428,7 +9428,7 @@ task_d2d_restoreparts() { # e.g., check_md5sum="no" eval check_${imtd}="no" done - # To do backward compatability, we still keep task_bt_restoreparts function, but let task_restoreparts do the real job. + # To do backward compatibility, we still keep task_bt_restoreparts function, but let task_restoreparts do the real job. task_restoreparts "$target_dir" "$target_parts" "$port" } # end of task_d2d_restoreparts @@ -9635,7 +9635,7 @@ task_restoreparts() { for ihd in $target_hd; do # Restore the hidden data between MBR and 1st partition. Maybe it's useless, maybe it's useful. Since some of the recovery programs put data on that. # Only for MBR, excluding GPT type of disk. We only deal with MBR for this hidden data - if `is_mbr_partitition_table_disk /dev/$ihd`; then + if `is_mbr_partition_table_disk /dev/$ihd`; then echo $msg_delimiter_star_line | tee --append $OCS_LOGFILE if [ -e "$target_dir_fullpath/$(to_filename ${ihd})-hidden-data-after-mbr" ]; then restore_hidden_data_after_MBR $ihd $target_dir_fullpath/$(to_filename ${ihd})-hidden-data-after-mbr @@ -9679,7 +9679,7 @@ task_restoreparts() { if [ -z "$lks_mapper" ]; then [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_luks_mapped_name_not_found_in_this_file: $target_dir_fullpath/luks-crypttab-from-OS.info." - echo "$msg_name_it_arbitrarily_restered_os_boot_might_fail" + echo "$msg_name_it_arbitrarily_restored_os_boot_might_fail" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL countdown 5 echo @@ -9769,7 +9769,7 @@ task_restoreparts() { # Local disk to local disk only allows same partition name clone, e.g., sda1 -> sdb1 lsrc_dev="$(echo $partition | replace_disk_name_stdin $target_hd $source_hd)" ;; "ld2d_restoreparts") - # Local part to local part only allows differents partition name clone, e.g., sda2 -> sdb1 + # Local part to local part only allows different partition name clone, e.g., sda2 -> sdb1 lsrc_dev="$source_part" ;; esac do_d2d_local_restore $target_dir_fullpath $lsrc_dev /dev/$partition @@ -9890,7 +9890,7 @@ task_restoreparts() { # Strip the leading spaces processed_extended_parts="$(echo $processed_extended_parts | sed -r -e "s|^[[:space:]]*||g")" - # There is still one possiblity that we need to deal with LVM, i.e. PV is not on partition, + # There is still one possibility that we need to deal with LVM, i.e. PV is not on partition, # instead it's on a disk (e.g. /dev/sdb). pv_on_dsk="$(get_pv_on_disk_from_PV_conf_list "$PV_PARSE_CONF")" for ip in $pv_on_dsk; do @@ -9912,7 +9912,7 @@ task_restoreparts() { if [ "$do_LVM_restore" = "yes" ]; then # LVM exists, restore PV/VG/LV. echo "LVM exists, restoring PV/VG/LV." | tee --append ${OCS_LOGFILE} - # Append the whole disk to the partitions list. Althouth it's a disk, but it contains LV. + # Append the whole disk to the partitions list. Although it's a disk, but it contains LV. # However, we do not put the disk name to $target_parts otherwise it might cause confusion. restore_logv "$target_parts" $net_mode $port echo $msg_delimiter_star_line | tee --append ${OCS_LOGFILE} @@ -10060,7 +10060,7 @@ task_restoreparts() { echo $msg_delimiter_star_line | tee --append $OCS_LOGFILE fi - # Reloc ntfs boot partition + # Realloc ntfs boot partition if [ "$change_ntfs_boot_chs" = "on" ]; then echo "Running: run_ntfsreloc_part -p \"$target_parts\" $ntfs_boot_partition" | tee --append $OCS_LOGFILE run_ntfsreloc_part -p "$target_parts" $ntfs_boot_partition | tee --append $OCS_LOGFILE @@ -10092,7 +10092,7 @@ task_restoreparts() { # Updating EFI NVRAM for the boot device if [ "$update_efi_nvram" = "yes" ]; then for ihd in $target_hd; do - if `is_gpt_partitition_table_disk /dev/$ihd` && \ + if `is_gpt_partition_table_disk /dev/$ihd` && \ ! `is_gpt_disk_with_bios_boot_part_in_legacy_bios /dev/$ihd`; then efi_info_tmp="$(mktemp /tmp/efi_info.XXXXXX)" update_efi_nvram_boot_entry_cmd="update-efi-nvram-boot-entry -r $target_dir_fullpath/efi-nvram.dat -f $efi_info_tmp /dev/$ihd" @@ -10146,13 +10146,13 @@ task_multicast_restoreparts() { # e.g., check_md5sum="no" eval check_${imtd}="no" done - # To do backward compatability, we still keep task_multicast_restoreparts function, but let task_restoreparts do the real job. + # To do backward compatibility, we still keep task_multicast_restoreparts function, but let task_restoreparts do the real job. task_restoreparts "$target_dir" "$target_parts" "$port" } check_boot_kernel_arg_cmdline() { # The mode assigned when client boots, if this is assigned, - # it will overide the mode assigned by server + # it will override the mode assigned by server if grep -i -q "drbl_ocs=disallow" /proc/cmdline; then [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE echo "Clonezilla server assigned drbl_ocs=\"disallow\" for this client, so the clonezilla execution in this machine is aborted!" @@ -10313,10 +10313,10 @@ do_startdisk() { case "$task" in "restore"|"multicast_restore"|"bt_restore") if [ "$target_image" != "ask_user" ]; then - # If it's restore, we have to conver the old format to newer + # If it's restore, we have to convert the old format to newer convert_ocs_format_from_1.5_to_2.0_or_newer $imagedir/$target_image/ fi - if [ -d "$imagedir/$target_image" -a "$chk_img_restoreable_on_srv" = "yes" ]; then + if [ -d "$imagedir/$target_image" -a "$chk_img_restorable_on_srv" = "yes" ]; then echo $msg_delimiter_star_line check_image_if_restorable -i "$target_image" "$imagedir" rc_chkimg="$?" @@ -10451,10 +10451,10 @@ do_startparts () { case "$task" in "restore"|"multicast_restore"|"bt_restore") if [ "$target_image" != "ask_user" ]; then - # If it's restore, we have to conver the old format to newer + # If it's restore, we have to convert the old format to newer convert_ocs_format_from_1.5_to_2.0_or_newer $imagedir/$target_image/ fi - if [ -d "$imagedir/$target_image" -a "$chk_img_restoreable_on_srv" = "yes" ]; then + if [ -d "$imagedir/$target_image" -a "$chk_img_restorable_on_srv" = "yes" ]; then echo $msg_delimiter_star_line check_image_if_restorable -i "$target_image" "$imagedir" rc_chkimg="$?" @@ -10507,7 +10507,7 @@ do_select_in_client() { # Set the single user mode password if not setting for client...This will be safer..." set_clients_rc1_passwd $IP_LIST - # If the mode is in always_restore, and PXE default menu is assigned to local (-y0), we will set local boot as default. Since the always_restore mode is only useful with local OS exists. But if in some scenario, such as production clone flow, maybe pxe_menu_default_mode=clone is useful, since a lot of hardisks will be replaced one by one. + # If the mode is in always_restore, and PXE default menu is assigned to local (-y0), we will set local boot as default. Since the always_restore mode is only useful with local OS exists. But if in some scenario, such as production clone flow, maybe pxe_menu_default_mode=clone is useful, since a lot of harddisks will be replaced one by one. if [ "$always_restore" = "yes" ]; then case "$pxe_menu_default_mode" in "local") @@ -10707,7 +10707,7 @@ USAGE_common_restore(){ # This --max-time-to-wait exists both in drbl-ocs and ocs-sr is because # ocs-sr need to know the --max-time-to-wait so that when sleeping # between partitions restoring clone won't timeout. - echo " --max-time-to-wait TIME When not enough clients have connected (but at least one), start anyways when TIME seconds since first client connection have pased. This option is used with --clients-to-wait" + echo " --max-time-to-wait TIME When not enough clients have connected (but at least one), start anyways when TIME seconds since first client connection have passed. This option is used with --clients-to-wait" echo " -cm, --check-md5sum Check the MD5 checksum for the image. To use this option, you must enable -gm|--gen-md5sum option when the image is saved. Note! It might take a lot of time to check if the image size is large." echo " -cs, --check-sha1sum Check the SHA1 checksum for the image. To use this option, you must enable -gs|--gen-sha1sum option when the image is saved. Note! It might take a lot of time to check if the image size is large." echo " -cmf, --chk-chksum-for-files-in-dev Check the checksum for the files in the device. To use this option, you must enable -gmf|--gen-chksum-for-files-in-dev when the image is saved. Note! (1) The file system must be supported by Linux kernel so that it can be mounted as read-only to check the files. (2) It might take a lot of time to check if there are many files in the source device." @@ -11225,7 +11225,7 @@ get_live_media_mnt_point() { # squash_f default is filesystem.squashfs, but on PXE server, it might be changed. E.g. fetch=tftp://192.168.1.254/Clonezilla-live-filesystem.squashfs. We will overwrite the default value if fetch is found. parse_cmdline_option fetch [ -n "$fetch" ] && squash_f="$(basename $fetch)" - # Besids $live_sys_files_dir_list, user might assign his/her own live_sys_files_dir_list in the media (e.g. /live-hd). We can try to find it from the boot parameter "live-media-path" (//NOTE// Function parse_cmdline_option in drbl-functions is not working for this varialbe live-media-path, since it can not be a shell script variable. + # Besides $live_sys_files_dir_list, user might assign his/her own live_sys_files_dir_list in the media (e.g. /live-hd). We can try to find it from the boot parameter "live-media-path" (//NOTE// Function parse_cmdline_option in drbl-functions is not working for this variable live-media-path, since it can not be a shell script variable. extra_live_media_path="$(LC_ALL=C grep -oE "live-media-path=([[:alnum:]]|_|-|\.|\/)*([[:space:]]|$)+" /proc/cmdline | sed -e "s/live-media-path=//g")" for i in $extra_live_media_path $live_media_path_chklist; do if test -n "$(find $i -maxdepth 3 -name "$squash_f" -print 2>/dev/null)" ; then @@ -11575,7 +11575,7 @@ get_RawCHS_of_HD_from_hdparm() { # If RawCHS exists, CurCHS must exist, too. # echo "CurCHS of $selected_hd: $CurCHS" else - echo "RawCHS and CurCHS of $selected_hd is not found! Maybe this is ScSI device ?" + echo "RawCHS and CurCHS of $selected_hd is not found! Maybe this is SCSI device ?" fi } # end of get_RawCHS_of_HD_from_hdparm # @@ -11810,7 +11810,7 @@ fsck_partition() { [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL case "$partfs_" in ntfs) #ntfsfix $dev_;; - # If we use ntfsfix to fsck NTFS, ntfsclone and partclone need to use some special parameter to force clone. e.g. for ntfsclone, we have to use options "--force --rescue" (No such options for patclone.ntfs on Aug/05/2009). Therefore here we do not want to use ntfsfix to do that. It might cause some problems. + # If we use ntfsfix to fsck NTFS, ntfsclone and partclone need to use some special parameter to force clone. e.g. for ntfsclone, we have to use options "--force --rescue" (No such options for partclone.ntfs on Aug/05/2009). Therefore here we do not want to use ntfsfix to do that. It might cause some problems. [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "There is no good tool to check and repair NTFS on GNU/Linux, hence skip fscking this partition $dev_" [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL @@ -12035,7 +12035,7 @@ init_mbr_part_table_if_not_existing() { # check_mbr_disk_size_gt_2TiB() { local dest_dsk="$1" # e.g. /dev/sdc - local postaction="$2" # "exit" will exit, anything eles will continue + local postaction="$2" # "exit" will exit, anything else will continue # If dest_dsk size is larger than 2 TiB (~2.2 TB = 2,199,023,255,040 bytes), exit. It's over the MBR's limitation. dest_dsk_size_in_B="$(LC_ALL=C parted -s $dest_dsk unit B print | grep -E "^Disk /dev" | awk -F":" '{print $2}' | sed -e "s/B$//g")" dest_dsk_size_in_TB="$(LC_ALL=C parted -s $dest_dsk unit TB print | grep -E "^Disk /dev" | awk -F":" '{print $2}')" @@ -12791,7 +12791,7 @@ active_proc_partitions() { # output_blkdev_info() { local output_f="$1" - local dev_="$2" # if dev_ is mssing, then it means the whole system. + local dev_="$2" # if dev_ is missing, then it means the whole system. LC_ALL=C lsblk -o KNAME,NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,MODEL $dev_ > $output_f } # end of output_blkdev_info # @@ -13103,7 +13103,7 @@ get_part_name_from_uuid_in_harddrive() { # get_best_console_font_size() { # console_prefer_cols (input, from drbl-ocs.conf) and console_font_size (output) are global variables. - local resoluton_cols font_size_cols + local resolution_cols font_size_cols # # The output of "fbset -s" is like: # mode "1280x1024" @@ -13115,17 +13115,17 @@ get_best_console_font_size() { # # Valid font faces are: VGA (sizes 8x8, 8x14, 8x16, 16x28 and 16x32), Terminus (sizes 6x12, 8x14, 8x16, 10x20, 12x24, 14x28 and 16x32), TerminusBold (sizes 8x14, 8x16, 10x20, 12x24, 14x28 and 16x32), TerminusBoldVGA (sizes 8x14 and 8x16), and Fixed (sizes 8x13, 8x14, 8x15, 8x16 and 8x18). If however CODESET=Ethiopian, then the available font faces are Goha and GohaClassic, each in sizes 8x12, 8x14 and 8x16. - resoluton_cols="$(LC_ALL=C fbset -s | grep -Ew "^[[:space:]]*geometry" | awk -F" " '{print $2}')" + resolution_cols="$(LC_ALL=C fbset -s | grep -Ew "^[[:space:]]*geometry" | awk -F" " '{print $2}')" # [ ! -e "/etc/default/console-setup" ] && exit 1 # . /etc/default/console-setup # # FONTSIZE is like: 16, 16x32 # font_rows="$(LC_ALL=C echo $FONTSIZE | awk -F"x" '{print $1}')" - # size_rows="$(echo "scale=0; ${resoluton_rows}/${font_rows}" | bc -l)" + # size_rows="$(echo "scale=0; ${resolution_rows}/${font_rows}" | bc -l)" # echo "row size: $size_rows" - if [ -n "$resoluton_cols" ]; then - font_size_cols="$(echo "scale=0; ${resoluton_cols}/${console_prefer_cols}" | bc -l)" + if [ -n "$resolution_cols" ]; then + font_size_cols="$(echo "scale=0; ${resolution_cols}/${console_prefer_cols}" | bc -l)" echo "Calculated font column size: $font_size_cols" fi # From Debian Sid (console-setup 1.95), the manual (man 5 console-setup) says: @@ -13141,7 +13141,7 @@ get_best_console_font_size() { # and 16) and Fixed (sizes 13, 14, 15, 16 and 18). # The file name is actually like: /usr/share/consolefonts/Lat2-TerminusBold20x10.psf.gz, both on Debian Sid and Ubuntu 13.04. # XXX The cols and rows are opposite... weird... - # However, for console-setup (1.71) unstable; urgency=low, the changelog mentionied: + # However, for console-setup (1.71) unstable; urgency=low, the changelog mentioned: # setupcon: accept all methods to state font size in the configuration file (8x14, 14x8, 14). Therefore we use the font size it can be accepted in old version. # Since the file names are: # dpkg -L console-setup-linux | grep -i uni2-terminusbold @@ -13317,7 +13317,7 @@ get_pv_on_disk_from_local_machine() { # get_pv_on_disk_from_PV_conf_list() { - # There is still one possiblity that we need to deal with LVM, i.e. PV is not on partition, + # There is still one possibility that we need to deal with LVM, i.e. PV is not on partition, # instead it's on a disk (e.g. /dev/sdb). local pv_cfg_list="$1" # The PV_PARSE_CONF file from the image dir. Absolute path. local lpv_on_dsk @@ -13735,7 +13735,7 @@ replace_disk_name_in_file(){ # /dev/nvme0n1p2 : start= 999424, size= 7999488, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=D47B030E-FCA6-485F-B6CF-5CC4BD708256 # /dev/nvme0n1p3 : start= 8998912, size= 2335225856, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=D9ED4B04-1077-4390-B177-B558445A7F38 # - # nvme0n1p3 has extra "p", we can not just s/nvme0n1/sda/, otherwise resutls: + # nvme0n1p3 has extra "p", we can not just s/nvme0n1/sda/, otherwise results: # will have "sdap1", the wrong partition name. # label: gpt # label-id: 8D91AEC3-EA8E-4312-BAF9-C2AE97025C48 @@ -13847,7 +13847,7 @@ replace_disk_name_stdin(){ # /dev/nvme0n1p2 : start= 999424, size= 7999488, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=D47B030E-FCA6-485F-B6CF-5CC4BD708256 # /dev/nvme0n1p3 : start= 8998912, size= 2335225856, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=D9ED4B04-1077-4390-B177-B558445A7F38 # - # nvme0n1p3 has extra "p", we can not just s/nvme0n1/sda/, otherwise resutls: + # nvme0n1p3 has extra "p", we can not just s/nvme0n1/sda/, otherwise results: # will have "sdap1", the wrong partition name. # label: gpt # label-id: 8D91AEC3-EA8E-4312-BAF9-C2AE97025C48 @@ -13984,12 +13984,12 @@ gen_chksum_for_files_in_dev() { | tee --append ${OCS_LOGFILE} rc_chk="${PIPESTATUS[0]}" - set_acess_mode_for_img "$tgt_dir/$(to_filename ${sum_part}).files-${chksum_cmd_for_files_in_dev}.info.gz" + set_access_mode_for_img "$tgt_dir/$(to_filename ${sum_part}).files-${chksum_cmd_for_files_in_dev}.info.gz" umount /dev/$sum_part else [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_fail_to_mount_maybe_linux_not_support: /dev/$sum_part" | tee --append ${OCS_LOGFILE} - echo "$msg_unsble_to_create_checksum_file" | tee --append ${OCS_LOGFILE} + echo "$msg_unable_to_create_checksum_file" | tee --append ${OCS_LOGFILE} [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL if [ "$ocs_batch_mode" != "on" ]; then echo -n "$msg_press_enter_to_continue..." @@ -14061,7 +14061,7 @@ inspect_chksum_for_files_in_dev() { else [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING echo "$msg_fail_to_mount_maybe_linux_not_support: /dev/$sum_part" | tee --append ${OCS_LOGFILE} - echo "$msg_unsble_to_inspect_checksum" | tee --append ${OCS_LOGFILE} + echo "$msg_unable_to_inspect_checksum" | tee --append ${OCS_LOGFILE} [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL if [ "$ocs_batch_mode" != "on" ]; then echo -n "$msg_press_enter_to_continue..." @@ -14141,7 +14141,7 @@ prepare_mnt_point_ocsroot() { } # end of prepare_mnt_point_ocsroot # load_ocsroot_mnt_cmd() { - # Function to be used for ocs-prep-repo and ocs-live-respository + # Function to be used for ocs-prep-repo and ocs-live-repository ocsroot_mnt_cmd_smb="LC_ALL=C mount -t cifs \"//${smb_srv}${smbfs_dir}\" $ocsroot -o user=\"${smb_account}${smb_password_opt}${smb_domain_opt}\"${smb_sec_opt}${smb_ver_opt}" ocsroot_mnt_cmd_nfs="LC_ALL=C mount -t $nfs_ver $nfs_srv:$nfs_dir $ocsroot -o $ocsroot_def_mnt_opt,$nfsvers_opt" ocsroot_mnt_cmd_webdav="LC_ALL=C mount -t davfs -o noexec $davfs_url $ocsroot" @@ -14244,7 +14244,7 @@ get_directories_list_common() { # This directory only contain itself, no any image in the subdir. fileinfo="${fileinfo}_NO_SUBDIR" fi - # Group them, collect normal dirs first, then conezilla img dir. + # Group them, collect normal dirs first, then clonezilla img dir. if [ -e "$file/clonezilla-img" ]; then filelist_CZ="$filelist_CZ $(basename "$file") $fileinfo" @@ -14599,13 +14599,13 @@ create_LVM_bt_image_files_from_partclone_img() { done < $LOGV_PARSE_CONF } # end of create_LVM_bt_image_files_from_partclone_img # -set_acess_mode_for_img() { +set_access_mode_for_img() { local img_prefix="$1" if [ "$only_access_by_owner" = "yes" -a -n "$img_prefix" ]; then echo "Change mode to 600 for these files: $img_prefix" chmod 600 $img_prefix 2>/dev/null fi -} # end of set_acess_mode_for_img +} # end of set_access_mode_for_img # check_if_in_clonezilla_live(){ # LIVE_MEDIA is global variable. @@ -14711,7 +14711,7 @@ ask_nic_dev() { # Check if it makes sense when channel bonding is enabled if [ "$enable_channel_bonding" = "yes" ]; then if [ "$nic_no" -lt 2 ]; then - echo "Disable channnel bonding since there is only one NIC found." + echo "Disable channel bonding since there is only one NIC found." enable_channel_bonding="no" fi fi @@ -14805,7 +14805,7 @@ ask_nic_dev() { $DIA --backtitle "$msg_nchc_free_software_labs" --title \ "$msg_nchc_clonezilla" --${dia_type} "$dia_prompt" 0 0 0 $DEVICELIST 2>"$nic_tmp" - # Force to strip the unnecessary quotation ', this is specially for dialog (from cdialog) in Mandriva and same reason to strip the unnecessary double quotation ", this is sepcially for dialog in OpenSuSE 11.1. Otherwise it will cause -p reboot become (containing space) '-p reboot', which is wrong option in dcs. + # Force to strip the unnecessary quotation ', this is specially for dialog (from cdialog) in Mandriva and same reason to strip the unnecessary double quotation ", this is specially for dialog in OpenSuSE 11.1. Otherwise it will cause -p reboot become (containing space) '-p reboot', which is wrong option in dcs. LC_ALL=C perl -pi -e "s/\'//g" $nic_tmp LC_ALL=C perl -pi -e "s/\"//g" $nic_tmp chosen_nics="$(cat $nic_tmp)" @@ -14949,15 +14949,15 @@ force_to_dd_clone_local_part() { esac } # end of force_to_dd_clone_local_part # -local_partition_to_partiton_clone() { +local_partition_to_partition_clone() { local pt_fs="$1" local src_p="$2" # src_p is like /dev/hda1 local tgt_p="$3" # tgt_p is like /dev/hdb1 local pt_size ret dd_img_info_tmp dd_report_sig_pid start_time end_time partition local cmd_partclone - # FORCE_TO_USE_DD, USE_NTFSCLONE_IN_OCS_ONTHEFLY, USE_PARTCLONE_IN_OCS_ONTHEFLY are global variabls. + # FORCE_TO_USE_DD, USE_NTFSCLONE_IN_OCS_ONTHEFLY, USE_PARTCLONE_IN_OCS_ONTHEFLY are global variables. if [ -z "$pt_fs" -o -z "$src_p" -o -z "$tgt_p" ]; then - echo "Wrong options in local_partition_to_partiton_clone!!!" | tee --append $OCS_LOGFILE + echo "Wrong options in local_partition_to_partition_clone!!!" | tee --append $OCS_LOGFILE echo "$msg_program_stop!" | tee --append ${OCS_LOGFILE} exit 1 fi @@ -15027,7 +15027,7 @@ local_partition_to_partiton_clone() { read fi return $ret -} # end of local_partition_to_partiton_clone +} # end of local_partition_to_partition_clone # netcat_nuttcp_check() { local nc_tmp @@ -15072,7 +15072,7 @@ netcat_nuttcp_check() { # This is the version Hobbit wrote (http://www.vulnwatch.org/netcat/) # The reason we want to add -q 0 for Hobbit version is that: # in Debian, if -q 0 is not set, it will wait forever... nc will not quit. - # However, in FC3 or ealier version, there is no -q option. nc will quit + # However, in FC3 or earlier version, there is no -q option. nc will quit # when EOF. [ -n "$(grep "\-q secs" $nc_tmp 2>/dev/null)" ] && NC_QUIT_OPT="-q 0" NC_LOCAL_PORT_OPT="$NC_QUIT_OPT -p" @@ -15378,7 +15378,7 @@ onthefly_feed_partition_or_lv_in_server() { fi done [ "$is_in_chosen_partition" = "no" ] && continue - # if it's swap, output the labe and uuid only. + # if it's swap, output the label and uuid only. case "$fs" in *[Ss][Ww][Aa][Pp]*|*extended*) continue ;; @@ -15473,7 +15473,7 @@ onthefly_receive_partition_or_lv_in_client() { # Only when the target_type is disk we will create swap partition, other we might make a mistake to format the existing partition as swap partition. if [ "$target_type" = "disk" ]; then - # if it's swap, output the labe and uuid only. + # if it's swap, output the label and uuid only. case "$fs" in *[Ss][Ww][Aa][Pp]*) fn="$(echo $lv | sed -e "s|^/dev/||" -e "s|/|-|g")" @@ -15849,8 +15849,8 @@ unmount_dislocker_mount_point_if_necessary(){ get_netdev_type_on_system() { # Function to get the network type on the system. # Return type: none; wired; wireless; both - # //NOTE// /proc/net/wirless seems to be not working well for USB wireless - # device. Even when it's plugged, it's not shown in /proc/net/wirless. + # //NOTE// /proc/net/wireless seems to be not working well for USB wireless + # device. Even when it's plugged, it's not shown in /proc/net/wireless. local nettype netdev_allno wired_no wireless_no netdev_allno="$(LC_ALL=C tail -n +3 /proc/net/dev 2>/dev/null | \ awk -F":" '!/lo:/{print $1}' | wc -l)" @@ -15870,7 +15870,7 @@ get_netdev_type_on_system() { } # end of get_netdev_type_on_system # show_nic_dev_status_on_system() { - echo "$msg_nic_status_on_sytem" + echo "$msg_nic_status_on_system" echo $msg_delimiter_star_line cat /proc/net/dev echo $msg_delimiter_star_line