# On Debian systems, the complete text of the GNU General Public License
# can be found in /usr/share/common-licenses/GPL-2 file.
-PROGRAM="`basename $0`"
+PROGRAM="$(basename $0)"
VERSION=0.0.1
# Source live conf
;;
ext2|ext3)
- DU_DIM="`du -ks ${COW} | cut -f1`"
- REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here...
+ DU_DIM="$(du -ks ${COW} | cut -f1)"
+ REAL_DIM="$(expr ${DU_DIM} + ${DU_DIM} / 20)" # Just 5% more to be sure, need something more sophistcated here...
genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root="${COW}" "${DEST}" || exit 1
;;
Is_same_mount ()
{
- dir1="`Base_path $1`"
- dir2="`Base_path $2`"
+ dir1="$(Base_path $1)"
+ dir2="$(Base_path $2)"
if [ "${dir1}" = "${dir2}" ]
then
{
# Parse command line
ARGS="$1"
- ARGUMENTS="`getopt --longoptions cow:,device:,output,resync-string:,type:,help,usage,version --name=${PROGRAM} --options c:d:o:t:r:,h,u,v --shell sh -- ${ARGS}`"
+ ARGUMENTS="$(getopt --longoptions cow:,device:,output,resync-string:,type:,help,usage,version --name=${PROGRAM} --options c:d:o:t:r:,h,u,v --shell sh -- ${ARGS})"
if [ "$?" != "0" ]
then
{
PRESEEDS=""
- for ARGUMENT in `cat /proc/cmdline`
+ for ARGUMENT in $(cat /proc/cmdline)
do
case "${ARGUMENT}" in
access=*)
then
for FILESYSTEM in squashfs ext2 ext3 xfs dir
do
- if [ "`echo ${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM}`" != "${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM}" ]
+ if [ "$(echo ${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM})" != "${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM}" ]
then
return 0
fi
do_httpmount ()
{
rc=1
- extension=`echo "${FETCH}" | sed 's/\(.*\)\.\(.*\)/\2/'`
+ extension=$(echo "${FETCH}" | sed 's/\(.*\)\.\(.*\)/\2/')
case "${extension}" in
squashfs|tgz|tar)
# Let's just mount the read-only file systems first
rofsstring=""
rofslist=""
- minor_kernel_version=`uname -r|cut -c 5-|sed 's/[^0-9].*//'`
+ minor_kernel_version=$(uname -r|cut -c 5-|sed 's/[^0-9].*//')
if [ "${NETBOOT}" = "nfs" ] && [ "${minor_kernel_version}" -lt 22 ]
then
# Read image names from ${MODULE}.module if it exists
if [ -e "${image_directory}/filesystem.${MODULE}.module" ]
then
- for IMAGE in `cat ${image_directory}/filesystem.${MODULE}.module`
+ for IMAGE in $(cat ${image_directory}/filesystem.${MODULE}.module)
do
image_string="${image_string} ${image_directory}/${image}"
done
elif [ -e "${image_directory}/${MODULE}.module" ]
then
- for IMAGE in `cat ${image_directory}/${MODULE}.module`
+ for IMAGE in $(cat ${image_directory}/${MODULE}.module)
do
image_string="${image_string} ${image_directory}/${image}"
done
done
# Now sort the list
- image_string="`echo ${image_string} | sed -e 's/ /\n/g' | sort `"
+ image_string="$(echo ${image_string} | sed -e 's/ /\n/g' | sort )"
fi
[ -n "${MODULETORAMFILE}" ] && image_string="${image_directory}/$(basename ${MODULETORAMFILE})"
if [ "${BUILD_SYSTEM}" = "Debian" ]
then
- user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s`
+ user_crypted="8Ab05sVQ4LLps" # as in $(echo "live" | mkpasswd -s)
else
user_crypted="U6aMy0wojraho" # "ubuntu"
fi
do
if echo "${mounts}" | grep -qs "^${testpath}"
then
- set -- `echo "${mounts}" | grep "^${testpath}" | lastline`
+ set -- $(echo "${mounts}" | grep "^${testpath}" | lastline)
echo ${1}
break
else
- testpath=`dirname $testpath`
+ testpath=$(dirname $testpath)
fi
done
}