=========================================================== .___ __ __ _________________ __ __ __| _/|__|/ |_ / ___\_` __ \__ \ | | \/ __ | | \\_ __\ / /_/ > | \// __ \| | / /_/ | | || | \___ /|__| (____ /____/\____ | |__||__| /_____/ \/ \/ grep rough audit - static analysis tool v2.8 written by @Wireghoul =================================[justanotherhacker.com]=== drbl-2.32.10/setup/files/misc/gdm-safe-restart-12-# exec the kill to get the correct return code drbl-2.32.10/setup/files/misc/gdm-safe-restart:13:exec kill -USR1 `cat $PIDFILE` ############################################## drbl-2.32.10/setup/files/misc/arm-wol-30- echo drbl-2.32.10/setup/files/misc/arm-wol:31: echo "[$LOGNAME] You need to run this script \"`basename $0`\" as root." drbl-2.32.10/setup/files/misc/arm-wol-32- echo ############################################## drbl-2.32.10/setup/files/misc/mkswapfile-55- swapon $p drbl-2.32.10/setup/files/misc/mkswapfile:56: exist_swap_size=`cat /proc/swaps | grep $p | awk -F" " '{print $3}'` drbl-2.32.10/setup/files/misc/mkswapfile:57: exist_swap_size_in_MB=`expr $exist_swap_size / 1000` drbl-2.32.10/setup/files/misc/mkswapfile-58- echo "$p with size $exist_swap_size_in_MB (MB)." drbl-2.32.10/setup/files/misc/mkswapfile:59: total_swap_size=`expr $exist_swap_size_in_MB + $total_swap_size` drbl-2.32.10/setup/files/misc/mkswapfile-60- [ $total_swap_size -ge $maxswapsize ] && return 0 ############################################## drbl-2.32.10/setup/files/misc/mkswapfile-79- # drbl-2.32.10/setup/files/misc/mkswapfile:80: SwapSize_Need=`expr $maxswapsize - $total_swap_size` drbl-2.32.10/setup/files/misc/mkswapfile-81- d="/tmp/${p##*/}" ############################################## drbl-2.32.10/setup/files/misc/mkswapfile-92- AVAIL=$(df --block-size=1M $d | awk '/^\/dev\//{print $4}') drbl-2.32.10/setup/files/misc/mkswapfile:93: AVAIL=`expr $AVAIL + $exist_size_in_MB` drbl-2.32.10/setup/files/misc/mkswapfile-94- AVAIL=$(echo "scale=0; $AVAIL * 3 / 5 " |bc -l) ############################################## drbl-2.32.10/setup/files/misc/mkswapfile-119- # check if the total_swap_size is greater than $maxswapsize drbl-2.32.10/setup/files/misc/mkswapfile:120: total_swap_size=`expr $Swap_2_create + $total_swap_size` drbl-2.32.10/setup/files/misc/mkswapfile-121- [ "$total_swap_size" -ge "$maxswapsize" ] && return 0 ############################################## drbl-2.32.10/setup/files/misc/mkswapfile-128-rmswapfile() { drbl-2.32.10/setup/files/misc/mkswapfile:129: for p in `fdisk -l | grep "^\/dev\/" | awk '{ if($2=="*" && $6!="f" && $6!="0") print $1; if($2!="*" && $5!="f" && $5!="0") print $1; }'` drbl-2.32.10/setup/files/misc/mkswapfile-130- do ############################################## drbl-2.32.10/setup/files/misc/drblthincli-67- for DEVICE in $NETDEVICES; do drbl-2.32.10/setup/files/misc/drblthincli:68: IP_tmp=`LC_ALL=C /sbin/ifconfig | grep -A1 $DEVICE | grep -v $DEVICE | grep "inet addr" | sed 's/^.*inet addr:\([0-9\.]\+\).*$/\1/'` drbl-2.32.10/setup/files/misc/drblthincli-69- if [ -n "$IP_tmp" ]; then ############################################## drbl-2.32.10/bin/drbl-doit-13-USAGE() { drbl-2.32.10/bin/drbl-doit:14: echo "Usage: `basename $0` Options [command]" drbl-2.32.10/bin/drbl-doit-15- echo "Options:" ############################################## drbl-2.32.10/bin/drbl-doit-25- echo " To poweroff all DRBL clients" drbl-2.32.10/bin/drbl-doit:26: echo " `basename $0` -u root /sbin/poweroff" drbl-2.32.10/bin/drbl-doit-27- echo " To reboot all Cygwin clients, use" drbl-2.32.10/bin/drbl-doit:28: echo " `basename $0` -u Administrator /usr/bin/reboot -f now" drbl-2.32.10/bin/drbl-doit-29-} ############################################## drbl-2.32.10/sbin/drbl-pxelinux-passwd-16- echo "To set the pxelinux password for clients:" drbl-2.32.10/sbin/drbl-pxelinux-passwd:17: echo "`basename $0` [OPTION]" drbl-2.32.10/sbin/drbl-pxelinux-passwd-18- echo "Options:" ############################################## drbl-2.32.10/sbin/drbl-pxelinux-passwd-27- echo "To assign the PXELinux password for all label blocks, run" drbl-2.32.10/sbin/drbl-pxelinux-passwd:28: echo "`basename $0` -e" drbl-2.32.10/sbin/drbl-pxelinux-passwd-29- echo "To assign the PXELinux password for menu label \"drbl\" and \"local\" only, run" drbl-2.32.10/sbin/drbl-pxelinux-passwd:30: echo "`basename $0` -e -b \"drbl local\"" drbl-2.32.10/sbin/drbl-pxelinux-passwd-31- echo "To disable the authentication mechanism, run" drbl-2.32.10/sbin/drbl-pxelinux-passwd:32: echo "`basename $0` -d" drbl-2.32.10/sbin/drbl-pxelinux-passwd-33-} ############################################## drbl-2.32.10/sbin/Forcevideo-drbl-live-54- echo drbl-2.32.10/sbin/Forcevideo-drbl-live:55: echo "[$LOGNAME] You need to run this script \"`basename $0`\" as root." drbl-2.32.10/sbin/Forcevideo-drbl-live-56- echo ############################################## drbl-2.32.10/sbin/drbl-client-root-passwd-27- echo "To set the root's password for clients:" drbl-2.32.10/sbin/drbl-client-root-passwd:28: echo "`basename $0` [OPTION]" drbl-2.32.10/sbin/drbl-client-root-passwd-29- echo " Options:" ############################################## drbl-2.32.10/sbin/drbl-client-root-passwd-110-for ihost in $host_list; do drbl-2.32.10/sbin/drbl-client-root-passwd:111: echo -n "Change the root's password for DRBL client `basename $ihost`..." drbl-2.32.10/sbin/drbl-client-root-passwd-112- create_chpasswd_env $ihost ############################################## drbl-2.32.10/sbin/drbl-useradd-range-20-# drbl-2.32.10/sbin/drbl-useradd-range:21:run_cmd="`basename $0`" drbl-2.32.10/sbin/drbl-useradd-range-22- ############################################## drbl-2.32.10/sbin/drbl-useradd-range-58-# check if groupname is not valid one drbl-2.32.10/sbin/drbl-useradd-range:59:if `echo "$groupname" | grep -q "^[0-9]"`; then drbl-2.32.10/sbin/drbl-useradd-range-60- echo "groupname can NOT begin with digits (0-9)!" ############################################## drbl-2.32.10/sbin/drbl-useradd-range-70-student=$name_prefix drbl-2.32.10/sbin/drbl-useradd-range:71:nnum=`echo -n "$end_no" | wc -c` drbl-2.32.10/sbin/drbl-useradd-range-72-while [ $i -le $end_no ] ; do drbl-2.32.10/sbin/drbl-useradd-range-73- label="$i" drbl-2.32.10/sbin/drbl-useradd-range:74: n=`echo -n "$label" | wc -c` drbl-2.32.10/sbin/drbl-useradd-range-75- while [ $n -lt $nnum ]; do drbl-2.32.10/sbin/drbl-useradd-range-76- label="0$label" drbl-2.32.10/sbin/drbl-useradd-range:77: n=`echo -n "$label" | wc -c` drbl-2.32.10/sbin/drbl-useradd-range-78- done ############################################## drbl-2.32.10/sbin/drbl-useradd-range-80- echo "$student$label $groupname $password_opt" >> $ACCOUNT_FILE_TMP drbl-2.32.10/sbin/drbl-useradd-range:81: i=`expr $i + 1` drbl-2.32.10/sbin/drbl-useradd-range-82-done ############################################## drbl-2.32.10/sbin/drbl-fuh-14-# drbl-2.32.10/sbin/drbl-fuh:15:run_cmd="`basename $0`" drbl-2.32.10/sbin/drbl-fuh-16- ############################################## drbl-2.32.10/sbin/drbl-fuh-35- echo drbl-2.32.10/sbin/drbl-fuh:36: echo "Usage: `basename $0` [-d|--directory DIR ] [-v|--verbose] source target" drbl-2.32.10/sbin/drbl-fuh-37- echo "-d, --directory=DIR: process the DIR relative to client root directory" ############################################## drbl-2.32.10/sbin/drbl-fuh-180- -z "$(echo "$target_file" | grep -Ew "^/var")" ]; then drbl-2.32.10/sbin/drbl-fuh:181: echo "You should use drblpush to deploy the files, not this program. This program `basename $0` will only copy files to DRBL client's /etc, /root, or /var!". drbl-2.32.10/sbin/drbl-fuh-182- else ############################################## drbl-2.32.10/sbin/drbl-user-env-reset-16-# drbl-2.32.10/sbin/drbl-user-env-reset:17:run_cmd="`basename $0`" drbl-2.32.10/sbin/drbl-user-env-reset-18- ############################################## drbl-2.32.10/sbin/drbl-user-env-reset-66-# check if group exists drbl-2.32.10/sbin/drbl-user-env-reset:67:if [ -n "$chosen_group" -a "$chosen_group" != "all" -a "$chosen_group" != "auto_login" -a -z "`grep \"^$chosen_group:\" /etc/group 2>/dev/null`" ]; then drbl-2.32.10/sbin/drbl-user-env-reset-68- echo "group $chosen_group does NOT exist!!!" ############################################## drbl-2.32.10/sbin/drbl-user-env-reset-100- for ihost in `get-client-ip-list`; do drbl-2.32.10/sbin/drbl-user-env-reset:101: iaccount="`get_existing_autologin_account $drblroot/$ihost`" drbl-2.32.10/sbin/drbl-user-env-reset-102- account_list="$account_list $iaccount" ############################################## drbl-2.32.10/sbin/drbl-user-env-reset-114-# remove the leading space if it exists drbl-2.32.10/sbin/drbl-user-env-reset:115:account_list=`echo $account_list | sed -e "s/^ //g"` drbl-2.32.10/sbin/drbl-user-env-reset-116-# check the account list ############################################## drbl-2.32.10/sbin/drbl-useradd-list-69- # check if groupname is not valid one drbl-2.32.10/sbin/drbl-useradd-list:70: if `echo "$groupname" | grep -q "^[0-9]"`; then drbl-2.32.10/sbin/drbl-useradd-list-71- echo "groupname can NOT begin with digits (0-9)!" ############################################## drbl-2.32.10/sbin/drbl-clean-autologin-account-69-for ihost in $host_list; do drbl-2.32.10/sbin/drbl-clean-autologin-account:70: iaccount="`get_existing_autologin_account $ihost`" drbl-2.32.10/sbin/drbl-clean-autologin-account-71- account_list="$account_list $iaccount" ############################################## drbl-2.32.10/sbin/drbl-clean-autologin-account-76-# remove the leading space drbl-2.32.10/sbin/drbl-clean-autologin-account:77:account_list=`echo $account_list | sed -e "s/^ //g"` drbl-2.32.10/sbin/drbl-clean-autologin-account-78- ############################################## drbl-2.32.10/sbin/drbl-add-vir-netdev-34-ocs_file="$0" drbl-2.32.10/sbin/drbl-add-vir-netdev:35:ocs=`basename $ocs_file` drbl-2.32.10/sbin/drbl-add-vir-netdev-36-# ############################################## drbl-2.32.10/sbin/drblsrv-offline-136- echo -n "." drbl-2.32.10/sbin/drblsrv-offline:137: installed_pkg=`rpm -qa | grep ^${ipkg}-[0-9]` drbl-2.32.10/sbin/drblsrv-offline-138- reinstall_pkg="$reinstall_pkg $installed_pkg.i586.rpm" ############################################## drbl-2.32.10/sbin/drblsrv-offline-238- [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE drbl-2.32.10/sbin/drblsrv-offline:239: echo "This script `basename $0` only works in kernel 2.6 or 3 or later with udev supported! The running kernel for client is not kernel 2.6 or 3 or later! Program terminated!" drbl-2.32.10/sbin/drblsrv-offline-240- [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL ############################################## drbl-2.32.10/sbin/drbl-useradd-97-# check if groupname is not valid one drbl-2.32.10/sbin/drbl-useradd:98:if `echo "$groupname" | grep -q "^[0-9]"`; then drbl-2.32.10/sbin/drbl-useradd-99- echo "groupname can NOT begin with digits (0-9)!" ############################################## drbl-2.32.10/sbin/drbl-aoe-img-dump-182-slot_no="" drbl-2.32.10/sbin/drbl-aoe-img-dump:183:for i in `seq 0 $aoe_shelf_max`; do drbl-2.32.10/sbin/drbl-aoe-img-dump:184: for j in `seq 0 $aoe_slot_max`; do drbl-2.32.10/sbin/drbl-aoe-img-dump-185- if [ -z "$(unalias ls &>/dev/null; ls -alFh $sanboot_img_dump_dir/*.aoe-$i-$j-for-* 2>/dev/null)" ]; then ############################################## drbl-2.32.10/sbin/drbl-login-switch-512- # if it does not exist. drbl-2.32.10/sbin/drbl-login-switch:513: if [ -z "`grep $PWD_NO_0_1_MSG $AUTO_LOGIN_ID_PASSWD 2>/dev/null`" ]; then drbl-2.32.10/sbin/drbl-login-switch-514- [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING ############################################## drbl-2.32.10/sbin/drbl-login-switch-682- for ihost in $host_list; do drbl-2.32.10/sbin/drbl-login-switch:683: echo -n "Setting node `basename $ihost` as $login_dm_mode... " drbl-2.32.10/sbin/drbl-login-switch-684- case "$login_dm_mode" in ############################################## drbl-2.32.10/sbin/drbl-login-switch-712- for ihost in $host_list; do drbl-2.32.10/sbin/drbl-login-switch:713: echo -n "Setting node `basename $ihost` as $login_dm_mode... " drbl-2.32.10/sbin/drbl-login-switch-714- case "$login_dm_mode" in ############################################## drbl-2.32.10/sbin/drbl-login-switch-733- for ihost in $host_list; do drbl-2.32.10/sbin/drbl-login-switch:734: echo -n "Setting node `basename $ihost` as $login_dm_mode... " drbl-2.32.10/sbin/drbl-login-switch-735- case "$login_dm_mode" in ############################################## drbl-2.32.10/sbin/drbl-login-switch-761- for ihost in $host_list; do drbl-2.32.10/sbin/drbl-login-switch:762: echo -n "Setting node `basename $ihost` as $login_dm_mode... " drbl-2.32.10/sbin/drbl-login-switch-763- case "$login_dm_mode" in ############################################## drbl-2.32.10/sbin/drbl-login-switch-789- [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE drbl-2.32.10/sbin/drbl-login-switch:790: echo "Unknown display manager! This display manager \"$preferred\" is not supported by `basename $0`." drbl-2.32.10/sbin/drbl-login-switch-791- [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL ############################################## drbl-2.32.10/sbin/drbl-client-service-69- on) drbl-2.32.10/sbin/drbl-client-service:70: echo "Turning on the service \"${service}\" for DRBL client `basename $ihost`..." drbl-2.32.10/sbin/drbl-client-service-71- if is_systemd_init; then drbl-2.32.10/sbin/drbl-client-service-72- if [ -e "$drbl_common_root/lib/systemd/system/${service}.service" ]; then drbl-2.32.10/sbin/drbl-client-service:73: # systemctl can't work in chroot environment :`chroot $drbl_common_root/ /sbin/chkconfig --add $i` drbl-2.32.10/sbin/drbl-client-service-74- # Therefore manually link it: ############################################## drbl-2.32.10/sbin/drbl-client-service-110- off) drbl-2.32.10/sbin/drbl-client-service:111: echo "Turning off the service \"${service}\" for DRBL client `basename $ihost`..." drbl-2.32.10/sbin/drbl-client-service-112- if is_systemd_init; then drbl-2.32.10/sbin/drbl-client-service-113- if [ -e "$drbl_common_root/lib/systemd/system/${service}.service" ]; then drbl-2.32.10/sbin/drbl-client-service:114: # systemctl can't work in chroot environment :`chroot $drbl_common_root/ /sbin/chkconfig --add $i` drbl-2.32.10/sbin/drbl-client-service-115- # Therefore manually link it: ############################################## drbl-2.32.10/sbin/drbl-client-service-150- reset) drbl-2.32.10/sbin/drbl-client-service:151: echo "Resetting the service \"${service}\" for DRBL client `basename $ihost`..." drbl-2.32.10/sbin/drbl-client-service-152- if [ -e /etc/debian_version ]; then ############################################## drbl-2.32.10/sbin/drbl-client-service-164- add) drbl-2.32.10/sbin/drbl-client-service:165: echo "Adding the service \"${service}\" for DRBL client `basename $ihost`..." drbl-2.32.10/sbin/drbl-client-service-166- if [ -e /etc/debian_version ]; then ############################################## drbl-2.32.10/sbin/drbl-client-service-178- del) drbl-2.32.10/sbin/drbl-client-service:179: echo "Deleting the service \"${service}\" for DRBL client `basename $ihost`..." drbl-2.32.10/sbin/drbl-client-service-180- if [ -e /etc/debian_version ]; then ############################################## drbl-2.32.10/sbin/drbl-client-service-192- list) drbl-2.32.10/sbin/drbl-client-service:193: echo "Listing the service \"${service}\" for DRBL client `basename $ihost`..." drbl-2.32.10/sbin/drbl-client-service-194- if [ -e /etc/debian_version ]; then ############################################## drbl-2.32.10/sbin/drbl-useradd-file-66- # check if groupname is not valid one drbl-2.32.10/sbin/drbl-useradd-file:67: if `echo "$groupname" | grep -q "^[0-9]"`; then drbl-2.32.10/sbin/drbl-useradd-file-68- echo "groupname can NOT begin with digits (0-9)!" ############################################## drbl-2.32.10/sbin/drbl-client-switch-734- # NOTES: after the modification of PXE_CONF, we must run drbl-2.32.10/sbin/drbl-client-switch:735: # [ "$LIST_HOST" = "on" ] && set_specific_host_pxe_conf `cat $HOSTS_TMP` drbl-2.32.10/sbin/drbl-client-switch-736- # to update the pxeconf (both for 01-MAC and IP) ############################################## drbl-2.32.10/sbin/drbl-client-switch-1055- [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL drbl-2.32.10/sbin/drbl-client-switch:1056: echo "Available netinstall are: `echo $netinstall_list`" # make it show in one line drbl-2.32.10/sbin/drbl-client-switch-1057- echo "$msg_program_stop!" ############################################## drbl-2.32.10/sbin/drbl-collect-mac-206- drbl-2.32.10/sbin/drbl-collect-mac:207:for ethmac in `ls $drblmac/macadr-auto-*`; do drbl-2.32.10/sbin/drbl-collect-mac-208- eth=${ethmac/$drblmac\/macadr-auto-/} ############################################## drbl-2.32.10/sbin/drbl-syslinux-efi-pxe-sw-58-ocs_file="$0" drbl-2.32.10/sbin/drbl-syslinux-efi-pxe-sw:59:ocs=`basename $ocs_file` drbl-2.32.10/sbin/drbl-syslinux-efi-pxe-sw-60-# ############################################## drbl-2.32.10/sbin/drbl-proxy-dhcp-132-ocs_file="$0" drbl-2.32.10/sbin/drbl-proxy-dhcp:133:ocs=`basename $ocs_file` drbl-2.32.10/sbin/drbl-proxy-dhcp-134-mode="$1" ############################################## drbl-2.32.10/sbin/drbl-userdel-176- # check if the group2del exist ? drbl-2.32.10/sbin/drbl-userdel:177: user2del=`grep "^$group2del:" /etc/group | awk -F':' '{print $4}' | sed -e "s/,/ /g" ` drbl-2.32.10/sbin/drbl-userdel-178- if ! grep "^$group2del:" /etc/group > /dev/null; then ############################################## drbl-2.32.10/sbin/drbl-live-273- echo "# Created by drbl-live" > /etc/hosts.allow drbl-2.32.10/sbin/drbl-live:274: for i in `seq 1 $nloop`; do drbl-2.32.10/sbin/drbl-live-275- istart="$(echo "scale=0; 20*$((i-1))" | bc -l)" ############################################## drbl-2.32.10/sbin/drbl-live-277- echo -n "ALL: " >> /etc/hosts.allow drbl-2.32.10/sbin/drbl-live:278: for j in `seq $istart $iend`; do drbl-2.32.10/sbin/drbl-live-279- echo -n "${client_IP_list_ar[j]} " >> /etc/hosts.allow ############################################## drbl-2.32.10/sbin/drbl-find-dhcp-srv-212-ocs_file="$0" drbl-2.32.10/sbin/drbl-find-dhcp-srv:213:ocs=`basename $ocs_file` drbl-2.32.10/sbin/drbl-find-dhcp-srv-214-# ############################################## drbl-2.32.10/sbin/drbl-client-system-select-16- echo "To set the clients show prompt for boot system or not:" drbl-2.32.10/sbin/drbl-client-system-select:17: echo "`basename $0` [OPTION] [on|off]" drbl-2.32.10/sbin/drbl-client-system-select-18- echo " Options:" ############################################## drbl-2.32.10/sbin/drbl-fuu-13-# drbl-2.32.10/sbin/drbl-fuu:14:run_cmd="`basename $0`" drbl-2.32.10/sbin/drbl-fuu-15- ############################################## drbl-2.32.10/sbin/drbl-fuu-33- echo "drbl-cp-user (or drbl-user-cp) for putting files, drbl-get-user (or drbl-user-get) for collecting files, drbl-rm-user (or drbl-user-rm) for removing files." drbl-2.32.10/sbin/drbl-fuu:34: echo "Usage: `basename $0` [-g|--group] group [-d|--directory] directory [-v|--verbose] source target" drbl-2.32.10/sbin/drbl-fuu-35- echo "-g, --group GROUP Assign the user group to be processed as GROUP." ############################################## drbl-2.32.10/sbin/drbl-fuu-216- #echo "$imember user_home_dir:$USER_HOME_DIR" drbl-2.32.10/sbin/drbl-fuu:217: USER_HOME_DIR=`LC_ALL=C grep "^$imember:" /etc/passwd | awk -F':' '{print $6}'` drbl-2.32.10/sbin/drbl-fuu:218: uid=`LC_ALL=C grep "^$imember:" /etc/passwd | awk -F':' '{print $3}'` drbl-2.32.10/sbin/drbl-fuu:219: gid=`LC_ALL=C grep "^$imember:" /etc/passwd | awk -F':' '{print $4}'` drbl-2.32.10/sbin/drbl-fuu-220- case "$mode" in ############################################## drbl-2.32.10/sbin/drbl-fuu-235- "get") drbl-2.32.10/sbin/drbl-fuu:236: users=`LC_ALL=C grep "^.*:.*:$uid:" /etc/passwd | awk -F':' '{print $1}'` drbl-2.32.10/sbin/drbl-fuu-237- for iuser in $users; do drbl-2.32.10/sbin/drbl-fuu-238- # check if the uid is really the username drbl-2.32.10/sbin/drbl-fuu:239: if [ `LC_ALL=C id -u $iuser` = "$uid" ]; then drbl-2.32.10/sbin/drbl-fuu-240- #echo "The username for uid $uid is $iuser" ############################################## drbl-2.32.10/sbin/drblpush-73-chomp($IP_HOST_TABLE=`LC_ALL=C get-drbl-conf-param IP_HOST_TABLE`); drbl-2.32.10/sbin/drblpush:74:chomp($CLIENT_IP_HOSTNAME_LIST=`LC_ALL=C basename $IP_HOST_TABLE`); drbl-2.32.10/sbin/drblpush-75-chomp($drblroot=`LC_ALL=C get-drbl-conf-param drblroot`); ############################################## drbl-2.32.10/sbin/drblpush-137-# before changing to working directory, we copy the macadr-* into working dir drbl-2.32.10/sbin/drblpush:138:system("cp -f macadr-*.txt $drblpush_wd > /dev/null 2>&1"); drbl-2.32.10/sbin/drblpush-139-chdir ($drblpush_wd) || die ("Could not change to new working directory!!!"); ############################################## drbl-2.32.10/sbin/drblpush-143- # $_[1]: file to output containing client public IPs parameters (return) drbl-2.32.10/sbin/drblpush:144: my @drbl_ip=`cat $_[0]`; drbl-2.32.10/sbin/drblpush-145- my $public_ip_file="$_[1]"; ############################################## drbl-2.32.10/sbin/drblpush-294- print "#$delimiter{\"dash_line\"}\n"; drbl-2.32.10/sbin/drblpush:295: system("LC_ALL=C cat $public_ip_guess"); drbl-2.32.10/sbin/drblpush-296- print "#$delimiter{\"dash_line\"}\n"; ############################################## drbl-2.32.10/sbin/drblpush-312- # put the result file to working directory drbl-2.32.10/sbin/drblpush:313: system("LC_ALL=C cp -f $public_ip_tmp $public_ip_file"); drbl-2.32.10/sbin/drblpush-314- last SWITCH; ############################################## drbl-2.32.10/sbin/drblpush-319- # put the result file to working directory drbl-2.32.10/sbin/drblpush:320: system("LC_ALL=C cp -f $public_ip_guess $public_ip_file"); drbl-2.32.10/sbin/drblpush-321- last SWITCH; ############################################## drbl-2.32.10/sbin/drblpush-471- print "Finding the IP address for $ethx...\n" if $verbosity >=2; drbl-2.32.10/sbin/drblpush:472: chomp($nic_ethx_ip=`drbl-get-ipadd $ethx`); drbl-2.32.10/sbin/drblpush:473: chomp($nic_ethx_netmask=`drbl-get-netmask $ethx`); drbl-2.32.10/sbin/drblpush-474- if ( $nic_ethx_ip ) { drbl-2.32.10/sbin/drblpush-475- # Specially, we do not want the alias interface, such as:eth0:1 drbl-2.32.10/sbin/drblpush:476: my $IP=`drbl-get-ipadd $ethx`; drbl-2.32.10/sbin/drblpush-477- chomp($IP); ############################################## drbl-2.32.10/sbin/drblpush-512- # we just want one port, so use "head -n 1" to get the 1st one. drbl-2.32.10/sbin/drblpush:513: chomp($guess_uplink_port=`PATH=$PATH:/sbin/:/usr/sbin route -n | awk '/^0.0.0.0/ {print \$8}' | sort | head -n 1`); drbl-2.32.10/sbin/drblpush-514- print "$lang_deploy{\"unable_to_find_public_IP\"}\n". ############################################## drbl-2.32.10/sbin/drblpush-517- foreach my $ethx (@private_eth_ports){ drbl-2.32.10/sbin/drblpush:518: my $IP=`drbl-get-ipadd $ethx`; drbl-2.32.10/sbin/drblpush-519- chomp($IP); ############################################## drbl-2.32.10/sbin/drblpush-585- # my $ethx="$ethernet_sys[$i]"; drbl-2.32.10/sbin/drblpush:586: # my $IP=`drbl-get-ipadd $ethx`; drbl-2.32.10/sbin/drblpush-587- # chomp($IP); ############################################## drbl-2.32.10/sbin/drblpush-605- while ($detect_dhcp_rlt1 == 256) { drbl-2.32.10/sbin/drblpush:606: $detect_dhcp_rlt1=system("drbl-find-dhcp-srv -i $ethernet_sys[0] $drblpush_wd/dhcp-detect.tmp"); drbl-2.32.10/sbin/drblpush-607- if ($detect_dhcp_rlt1 == 256) { ############################################## drbl-2.32.10/sbin/drblpush-618- # Only when $drblpush_wd/dhcp-detect.tmp exists we will continue this drbl-2.32.10/sbin/drblpush:619: chomp($DHCPOFFER_eth=`. $drblpush_wd/dhcp-detect.tmp; echo \$DHCPOFFER_eth`); drbl-2.32.10/sbin/drblpush:620: chomp($DHCPOFFER_siaddr=`. $drblpush_wd/dhcp-detect.tmp; echo \$DHCPOFFER_siaddr`); drbl-2.32.10/sbin/drblpush:621: chomp($DHCPOFFER_yiaddr=`. $drblpush_wd/dhcp-detect.tmp; echo \$DHCPOFFER_yiaddr`); drbl-2.32.10/sbin/drblpush-622- if ($DHCPOFFER_siaddr) { ############################################## drbl-2.32.10/sbin/drblpush-641- print colored ("Use proxy DHCP. Adding virtual network drbl0...\n","$color_warn"); drbl-2.32.10/sbin/drblpush:642: system("drbl-add-vir-netdev $ethernet_sys[0] drbl0"); drbl-2.32.10/sbin/drblpush-643- my $detect_dhcp_rlt2=256; drbl-2.32.10/sbin/drblpush-644- while ($detect_dhcp_rlt2 == 256) { drbl-2.32.10/sbin/drblpush:645: $detect_dhcp_rlt2=system("drbl-find-dhcp-srv -i drbl0 $drblpush_wd/dhcp-detect-vir0.txt"); drbl-2.32.10/sbin/drblpush-646- if ($detect_dhcp_rlt2 == 256) { ############################################## drbl-2.32.10/sbin/drblpush-661- $DHCPOFFER_prefix=""; drbl-2.32.10/sbin/drblpush:662: chomp($DHCPOFFER_eth=`. $drblpush_wd/dhcp-detect-vir0.txt; echo \$DHCPOFFER_eth`); drbl-2.32.10/sbin/drblpush:663: chomp($DHCPOFFER_siaddr=`. $drblpush_wd/dhcp-detect-vir0.txt; echo \$DHCPOFFER_siaddr`); drbl-2.32.10/sbin/drblpush:664: chomp($DHCPOFFER_yiaddr=`. $drblpush_wd/dhcp-detect-vir0.txt; echo \$DHCPOFFER_yiaddr`); drbl-2.32.10/sbin/drblpush:665: chomp($DHCPOFFER_prefix=`. $drblpush_wd/dhcp-detect-vir0.txt; echo \$DHCPOFFER_prefix`); drbl-2.32.10/sbin/drblpush-666- if ($DHCPOFFER_yiaddr) { drbl-2.32.10/sbin/drblpush-667- if (!$DHCPOFFER_prefix) { drbl-2.32.10/sbin/drblpush:668: chomp($DHCPOFFER_prefix=`LC_ALL=C ip -o -f inet addr show $ethernet_sys[0] | awk -F" " '{print \$4}' | awk -F"/" '{print \$2}' | head -n 1`); drbl-2.32.10/sbin/drblpush-669- } drbl-2.32.10/sbin/drblpush:670: system("ip addr add $DHCPOFFER_yiaddr/$DHCPOFFER_prefix dev drbl0"); drbl-2.32.10/sbin/drblpush-671- # TODO: check if new dirvir0 exists. drbl-2.32.10/sbin/drblpush-672- # TODO: Write system config file for virtual network card (Debian/Ubuntu, Fedora...) drbl-2.32.10/sbin/drblpush:673: system("perl -p -i -e \"s/^use_existing_dhcp_srv=.*/use_existing_dhcp_srv=yes/g\" $drbl_syscfg/drbl.conf"); drbl-2.32.10/sbin/drblpush-674- # Put new virtual network card in $ethernet_sys ############################################## drbl-2.32.10/sbin/drblpush-702- if ("$whoiam" eq "root") { drbl-2.32.10/sbin/drblpush:703: system("LC_ALL=C drbl-collect-mac -n -l $language @ethernet_sys"); drbl-2.32.10/sbin/drblpush-704- print colored ("$lang_deploy{\"saved_mac_address_files_in_etc\"}\n", "$color_warn"); ############################################## drbl-2.32.10/sbin/drblpush-735- my $netmask_sys_tmp; drbl-2.32.10/sbin/drblpush:736: chomp($ip_sys_tmp=`drbl-get-ipadd $ethx`); drbl-2.32.10/sbin/drblpush:737: chomp($netmask_sys_tmp=`drbl-get-netmask $ethx`); drbl-2.32.10/sbin/drblpush-738- # We must get the static IP for this NIC, NO DHCP... ############################################## drbl-2.32.10/sbin/drblpush-747- # Find the available start IP which will not conflict with the server drbl-2.32.10/sbin/drblpush:748: my $ip_hostmin = `drbl-ipcalc $ip_sys_tmp $netmask_sys_tmp | awk -F' ' '/^HostMin:/ {print \$2}'`; drbl-2.32.10/sbin/drblpush-749- chomp($ip_hostmin); ############################################## drbl-2.32.10/sbin/drblpush-751- # Find the max number of the class drbl-2.32.10/sbin/drblpush:752: my $hostmax_no = `drbl-ipcalc $ip_sys_tmp $netmask_sys_tmp | grep -Ew "^Hosts/Net:" | awk -F":" '{print \$2}' | awk -F" " '{print \$1}'`; drbl-2.32.10/sbin/drblpush-753- chomp($hostmax_no); ############################################## drbl-2.32.10/sbin/drblpush-783- # we will try both cases, and copy the file to working dir. drbl-2.32.10/sbin/drblpush:784: $MAC_file[$i]=`basename $mac_f_tmp 2>/dev/null`; drbl-2.32.10/sbin/drblpush-785- chomp($MAC_file[$i]); drbl-2.32.10/sbin/drblpush:786: my $mac_dir=`dirname $mac_f_tmp 2>/dev/null`; drbl-2.32.10/sbin/drblpush-787- chomp($mac_dir); ############################################## drbl-2.32.10/sbin/drblpush-795- # this is the case if user specified file like "/root/mac1.txt" drbl-2.32.10/sbin/drblpush:796: system("[ -f $mac_dir/$MAC_file[$i] ] && cp -f $mac_dir/$MAC_file[$i] ./"); drbl-2.32.10/sbin/drblpush-797- ############################################## drbl-2.32.10/sbin/drblpush-800- drbl-2.32.10/sbin/drblpush:801: my $range_start_default = `echo $ip_hostmin | awk -F"." '{print \$4}'`; drbl-2.32.10/sbin/drblpush-802- chomp($range_start_default); ############################################## drbl-2.32.10/sbin/drblpush-827- # processed by check_MAC_file. Ex. the space line is stripped. drbl-2.32.10/sbin/drblpush:828: chomp($line=`LC_ALL=C cat $MAC_file[$i] 2>/dev/null | wc -l |tr -d \" \" `); drbl-2.32.10/sbin/drblpush-829- $range_end[$i]=$range_start[$i] + $line - 1; ############################################## drbl-2.32.10/sbin/drblpush-840- "$lang_deploy{\"range_prompt\"}\n"; drbl-2.32.10/sbin/drblpush:841: my $range_start_default = `echo $ip_hostmin | awk -F"." '{print \$4}'`; drbl-2.32.10/sbin/drblpush-842- chomp($range_start_default); ############################################## drbl-2.32.10/sbin/drblpush-866- if ( ! $assign_client_no_each_port ) { drbl-2.32.10/sbin/drblpush:867: $client_no=`LC_ALL=C unalias ls 2> /dev/null; ls -d /tftpboot/nodes/$ip_sys_prefix[$i].* 2>/dev/null |wc -w|sed -e "s/ //g"`; drbl-2.32.10/sbin/drblpush-868- chomp($client_no); ############################################## drbl-2.32.10/sbin/drblpush-893- $ip_sys_start[$i]=$ip_sys_prefix[$i].".".$range_start[$i]; drbl-2.32.10/sbin/drblpush:894: chomp($ip_sys_end[$i]=`drbl-ipcalc-list -c $total_client[$i] $ip_sys_start[$i] $netmask_sys_tmp | head -n $total_client[$i] | tail -n 1`); drbl-2.32.10/sbin/drblpush-895- ############################################## drbl-2.32.10/sbin/drblpush-931- $PUB_NIC=$pub_port_NAT; drbl-2.32.10/sbin/drblpush:932: chomp($IP_PUB_NIC=`drbl-get-ipadd $pub_port_NAT`); drbl-2.32.10/sbin/drblpush-933- } ############################################## drbl-2.32.10/sbin/drblpush-1349- # When CLIENT_INIT is chosen as text mode, default to use txt PXE menu drbl-2.32.10/sbin/drblpush:1350: my $SERIAL_CONSOLE=`LC_ALL=C grep -Ewi "^serial" $pxecfg_pd/pxelinux.cfg/default 2>/dev/null`; drbl-2.32.10/sbin/drblpush-1351- if ( $SERIAL_CONSOLE ){ ############################################## drbl-2.32.10/sbin/drblpush-1562- my $gateway; drbl-2.32.10/sbin/drblpush:1563: chomp($gateway=`LANG=C PATH=$PATH:/sbin/:/usr/sbin route -n | awk '/^0.0.0.0/ {print \$2}'`); drbl-2.32.10/sbin/drblpush-1564- print CONFIG_FILE <<END_CFG; ############################################## drbl-2.32.10/sbin/drblpush-1575- # set mode for more secure drbl-2.32.10/sbin/drblpush:1576: system("LC_ALL=C chmod 600 $DRBLPUSH_CONF"); drbl-2.32.10/sbin/drblpush-1577- ############################################## drbl-2.32.10/sbin/drblpush-1754- # try to get if the kernel running the server supports NFS over TCP, if not, ust NFS over UDP drbl-2.32.10/sbin/drblpush:1755: $nfsd_tcp_rlt=system("#!/bin/bash; . $DRBL_SCRIPT_PATH/sbin/drbl-functions; check_kernel_nfsd_tcp_config"); drbl-2.32.10/sbin/drblpush-1756- if ($nfsd_tcp_rlt == 256) { ############################################## drbl-2.32.10/sbin/drblpush-1800- #print "Searching installed Etherboot files for dhcpd.conf... "; drbl-2.32.10/sbin/drblpush:1801: #chomp(my $etherboot_zpxe=`$query_pkglist_cmd drbl-etherboot | grep -E "eb-.*-etherboot-pci.zpxe\$" | xargs basename`); drbl-2.32.10/sbin/drblpush:1802: #chomp(my $sis900_zpxe=`$query_pkglist_cmd drbl-etherboot | grep -E "sis900.zpxe\$" | xargs basename`); drbl-2.32.10/sbin/drblpush-1803- #print "done! \n"; ############################################## drbl-2.32.10/sbin/drblpush-2053-system("chmod 600 drbl_deploy.conf"); drbl-2.32.10/sbin/drblpush:2054:system("mkdir -p $drbl_syscfg; cp -f drbl_deploy.conf $drbl_syscfg/"); drbl-2.32.10/sbin/drblpush-2055- ############################################## drbl-2.32.10/sbin/drblpush-2899- if [ -e "$drbl_common_root/lib/systemd/system/$i.service" ]; then drbl-2.32.10/sbin/drblpush:2900: # systemctl can't work in chroot environment :`chroot $drbl_common_root/ /sbin/chkconfig --add $i` drbl-2.32.10/sbin/drblpush-2901- # Therefore manually link it: ############################################## drbl-2.32.10/sbin/drblpush-4184- my $nfsserver_sys; drbl-2.32.10/sbin/drblpush:4185: chomp($nfsserver_sys=`drbl-get-ipadd $interface`); drbl-2.32.10/sbin/drblpush-4186- # set nfsserver, the priority: use the config file first, if unset, then use the value in system ############################################## drbl-2.32.10/sbin/drblpush-4241- chomp($hostname_sys=`hostname`); drbl-2.32.10/sbin/drblpush:4242: chomp($netmask_sys=`drbl-get-netmask $interface`); drbl-2.32.10/sbin/drblpush:4243: chomp($ipaddr_sys=`drbl-get-ipadd $interface`); drbl-2.32.10/sbin/drblpush-4244- # the IP address for server is the NFS server for client ############################################## drbl-2.32.10/sbin/drblpush-4264- # from http://jodies.de/ipcalc drbl-2.32.10/sbin/drblpush:4265: $network = `drbl-ipcalc $ipaddr_sys $netmask_sys | awk -F' ' '/Network:/ {print \$2}' | sed -e "s|/.*||g"`; drbl-2.32.10/sbin/drblpush-4266- chomp($network); ############################################## drbl-2.32.10/sbin/drblpush-4370- # ip_start=1 drbl-2.32.10/sbin/drblpush:4371: chomp($total_count=`LC_ALL=C cat $mac | wc -l`); drbl-2.32.10/sbin/drblpush-4372- } drbl-2.32.10/sbin/drblpush:4373: chomp ($ip_hostmin=`LC_ALL=C drbl-ipcalc $ipaddr_sys $netmask_sys | awk -F' ' '/^HostMin:/ {print \$2}'`); drbl-2.32.10/sbin/drblpush-4374- # Here we add one more client, in case the IP address is used by server ############################################## drbl-2.32.10/sbin/drblpush-4381- # We should not let drbl-ipcalc-list to list 3 more IP addresses in case some of them are used, like in the server's ethernet port. Otherwise for class C, if user assigns total clients as 253, drbl-ipcalc-list won't be able to list 256 clients for class C (e.g. 192.168.1.0/24). drbl-2.32.10/sbin/drblpush:4382: system("drbl-ipcalc-list -c $total_count_request $ip_tmp_start $netmask_sys > $iplist_tmp"); drbl-2.32.10/sbin/drblpush-4383- # Check if any IP address in the output file. drbl-2.32.10/sbin/drblpush-4384- my $ip_tmp_no=""; drbl-2.32.10/sbin/drblpush:4385: chomp($ip_tmp_no=`LC_ALL=C wc -l $iplist_tmp | awk -F" " '{print \$1}'`); drbl-2.32.10/sbin/drblpush-4386- if ($ip_tmp_no eq "0" ) { ############################################## drbl-2.32.10/sbin/drblpush-4392- # Remove the nfsserver IP address. drbl-2.32.10/sbin/drblpush:4393: system("perl -pi -e \"s/\\b$nfsserver\\b\\n//g\" $iplist_tmp"); drbl-2.32.10/sbin/drblpush-4394- # Keep exact lines because drbl-ipcalc-list will output extra 3 lines drbl-2.32.10/sbin/drblpush:4395: system("LC_ALL=C head -n \"$total_count\" $iplist_tmp > $iplist_tmp.swap"); drbl-2.32.10/sbin/drblpush:4396: system("cp -a $iplist_tmp.swap $iplist_tmp"); drbl-2.32.10/sbin/drblpush-4397- unlink ("$iplist_tmp.swap") if -f "$iplist_tmp.swap"; ############################################## drbl-2.32.10/sbin/drblpush-4402- while($i <= $total_count) { drbl-2.32.10/sbin/drblpush:4403: chomp ($ip=`perl -ne "$i..$i and print" $iplist_tmp`); drbl-2.32.10/sbin/drblpush-4404- print "IP address:$ip\n" if $verbosity >=2; ############################################## drbl-2.32.10/sbin/drblpush-4413- $label_default=$hostname_prefix.$ip_shown; drbl-2.32.10/sbin/drblpush:4414: chomp($label_assigned=`LC_ALL=C get-assigned-hn-by-ip $ip`); drbl-2.32.10/sbin/drblpush-4415- if ($label_assigned) { ############################################## drbl-2.32.10/sbin/drblpush-4425- # without nbi set in config file drbl-2.32.10/sbin/drblpush:4426: chomp (my $macadd=`perl -ne "$i..$i and print" $mac`); drbl-2.32.10/sbin/drblpush-4427- print DHCPD_OUT <<EOF; ############################################## drbl-2.32.10/sbin/drblpush-4475- # HERE drbl-2.32.10/sbin/drblpush:4476: chomp(my $ipstart=`LC_ALL=C head -n 1 $iplist_tmp`); drbl-2.32.10/sbin/drblpush:4477: chomp(my $ipend=`LC_ALL=C tail -n 1 $iplist_tmp`); drbl-2.32.10/sbin/drblpush-4478- print DHCPD_OUT <<EOF; ############################################## drbl-2.32.10/sbin/drblpush-4487- # Keep file as ref file for later use. drbl-2.32.10/sbin/drblpush:4488: system("cp -a $iplist_tmp clients-of-$nfsserver.txt"); drbl-2.32.10/sbin/drblpush-4489- # Clean the temp IP addresses list file ############################################## drbl-2.32.10/sbin/drblpush-4498- $main_nic =~ s/:[0-9]+//g; drbl-2.32.10/sbin/drblpush:4499: chomp($main_nic_ip=`drbl-get-ipadd $main_nic`); drbl-2.32.10/sbin/drblpush:4500: chomp($main_nic_netmask=`drbl-get-netmask $main_nic`); drbl-2.32.10/sbin/drblpush:4501: chomp($main_nic_subnet=`LC_ALL=C drbl-ipcalc $main_nic_ip/$main_nic_netmask | grep -Ei "^Network:" | awk -F " " '{print \$2}' | sed -re "s|\/.*||g"`); drbl-2.32.10/sbin/drblpush-4502- print DHCPD_OUT <<EOF; ############################################## drbl-2.32.10/sbin/drblpush-4596-#for ihost in /tftpboot/nodes/*; do drbl-2.32.10/sbin/drblpush:4597:# ip="`basename $ihost`" drbl-2.32.10/sbin/drblpush-4598-# subnet=$(echo $ip | cut -d"." -f1-3) ############################################## drbl-2.32.10/sbin/drblpush-4876- #chnage its mode drbl-2.32.10/sbin/drblpush:4877: system("LC_ALL=C chmod 700 $main_sh"); drbl-2.32.10/sbin/drblpush-4878- ############################################## drbl-2.32.10/sbin/drblpush-4895- # note! maybe there are multiple MAC files when run drblpush with "-c" drbl-2.32.10/sbin/drblpush:4896: my $macfile_exist=system("LC_ALL=C ls $macfile_dir/$macfile_prefix* >/dev/null 2>&1"); drbl-2.32.10/sbin/drblpush-4897- if ($macfile_exist == 256) { ############################################## drbl-2.32.10/sbin/drblpush-4906- # empty those comment line, and delete the empty line and those comment line drbl-2.32.10/sbin/drblpush:4907: system("perl -p -i -e \"s/^[[:space:]]*#.*\$//g\" $macfile_dir/$macfile_prefix*"); drbl-2.32.10/sbin/drblpush:4908: system("perl -p -i -e \"s/^[[:space:]]*\$//g\" $macfile_dir/$macfile_prefix*"); drbl-2.32.10/sbin/drblpush:4909: my $macfile_check=`for ifile in $macfile_dir/$macfile_prefix*; do grep -v -E '([[:alnum:]]|:|^[[:space:]]*\$)' \$ifile; done`; drbl-2.32.10/sbin/drblpush-4910- chomp($macfile_check); ############################################## drbl-2.32.10/sbin/drblpush-5072- # (1) $config_file is inputted as absolute path, like /etc/drbl/drblpush.conf drbl-2.32.10/sbin/drblpush:5073: system("[ -f $config_file ] && cp -f $config_file ."); drbl-2.32.10/sbin/drblpush-5074- # (2) If the $config_file is input as relative path, like ./drblpush.conf, we have to copy it from $orig_wd, since now it's in working dir. drbl-2.32.10/sbin/drblpush:5075: system("[ -f $orig_wd/$config_file ] && cp -f $orig_wd/$config_file ."); drbl-2.32.10/sbin/drblpush-5076- # public IP setting drbl-2.32.10/sbin/drblpush:5077: system("[ -f $drbl_syscfg/$public_ip_list ] && cp -f $drbl_syscfg/$public_ip_list $public_ip_list"); drbl-2.32.10/sbin/drblpush-5078- # MAC address files drbl-2.32.10/sbin/drblpush:5079: system("cp -f $drbl_syscfg/macadr-*.txt . > /dev/null 2>&1"); drbl-2.32.10/sbin/drblpush-5080- ############################################## drbl-2.32.10/sbin/drblpush-5121- if ("$whoiam" eq "root") { drbl-2.32.10/sbin/drblpush:5122: system("$run_main"); drbl-2.32.10/sbin/drblpush-5123- }else{ ############################################## drbl-2.32.10/sbin/drblpush-5125- "$lang_word{\"please_enter\"} ". colored("$lang_word{\"root_passwd\"} ","$color_warn") ."$lang_word{\"to_deploy_them\"}...\n"; drbl-2.32.10/sbin/drblpush:5126: my $su_rlt=system("su -c '$run_main' root"); drbl-2.32.10/sbin/drblpush-5127- while ($su_rlt == 256) { drbl-2.32.10/sbin/drblpush:5128: $su_rlt=system("su -c '$run_main' root"); drbl-2.32.10/sbin/drblpush-5129- } ############################################## drbl-2.32.10/sbin/drblsrv-2492- #[ $RETVAL -eq 0 ] && break drbl-2.32.10/sbin/drblsrv:2493: rpm -q --qf '%{ARCH}' $ipkg > /dev/null && pkg_ARCH_now=`rpm -q --qf '%{ARCH}' $ipkg` drbl-2.32.10/sbin/drblsrv-2494- [ "$pkg_ARCH_now" = "i386" ] && break ############################################## drbl-2.32.10/sbin/drblsrv-2568- # So we have to use rpm -q --qf to check, not by return code. drbl-2.32.10/sbin/drblsrv:2569: rpm -q --qf '%{ARCH}' ${ipkg} > /dev/null && ipkg_ARCH_now=`rpm -q --qf '%{ARCH}' ${ipkg}` drbl-2.32.10/sbin/drblsrv-2570- [ "$ipkg_ARCH_now" = "i586" ] && continue ############################################## drbl-2.32.10/scripts/bin/drbl-check-dm-28- echo "To get the default display manager:" drbl-2.32.10/scripts/bin/drbl-check-dm:29: echo "`basename $0` [OPTION]" drbl-2.32.10/scripts/bin/drbl-check-dm-30- echo " Options:" ############################################## drbl-2.32.10/scripts/bin/drbl-get-nfsserver-53- gateway="$(LC_ALL=C route -n | awk '/^0.0.0.0/ {print $2}')" drbl-2.32.10/scripts/bin/drbl-get-nfsserver:54: if `is_valid_IPv4_add "$nfsserver_cand"`; then drbl-2.32.10/scripts/bin/drbl-get-nfsserver-55- nfsserver="$nfsserver_cand" ############################################## drbl-2.32.10/scripts/bin/list_latest_deb-13-usage () { drbl-2.32.10/scripts/bin/list_latest_deb:14: echo "Usage: `basename $0` [path]" drbl-2.32.10/scripts/bin/list_latest_deb-15- echo "Example:" drbl-2.32.10/scripts/bin/list_latest_deb:16: echo "`basename $0` /mirror/drbl-core/drbl-core/pool/drbl/unstable/drbl/" drbl-2.32.10/scripts/bin/list_latest_deb-17-} ############################################## drbl-2.32.10/scripts/bin/list_latest_tarball-31-USAGE () { drbl-2.32.10/scripts/bin/list_latest_tarball:32: echo "Usage: `basename $0` [path]" drbl-2.32.10/scripts/bin/list_latest_tarball-33- echo "Example:" drbl-2.32.10/scripts/bin/list_latest_tarball:34: echo "`basename $0` /mirror/src/stable/" drbl-2.32.10/scripts/bin/list_latest_tarball:35: echo "`basename $0` http://free.nchc.org.tw/drbl-core/src/stable/" drbl-2.32.10/scripts/bin/list_latest_tarball-36-} ############################################## drbl-2.32.10/scripts/bin/list_available_deb-22-usage () { drbl-2.32.10/scripts/bin/list_available_deb:23: echo "Usage: `basename $0` [path]" drbl-2.32.10/scripts/bin/list_available_deb-24- echo "Example:" drbl-2.32.10/scripts/bin/list_available_deb:25: echo "`basename $0` /mirror/apt/RPMS.drbl-test" drbl-2.32.10/scripts/bin/list_available_deb:26: echo "`basename $0` http://free.nchc.org.tw/fedora/apt/fedora/linux/2/i386/RPMS.drbl" drbl-2.32.10/scripts/bin/list_available_deb-27-} ############################################## drbl-2.32.10/scripts/bin/list_available_tarball-34-ocs_file="$0" drbl-2.32.10/scripts/bin/list_available_tarball:35:ocs=`basename $ocs_file` drbl-2.32.10/scripts/bin/list_available_tarball-36-# ############################################## drbl-2.32.10/scripts/bin/drbl-ipcalc-list-135- drbl-2.32.10/scripts/bin/drbl-ipcalc-list:136:if [ -z "$(echo $_IPCALC_PARM | grep -E '^[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}\/[[:digit:]]{1,2}$')" ] && [ -z "$(echo $_IPCALC_PARM | grep -E '^[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}[[:space:]]+[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}$')" ] && [ -z "$_IP_START" -o -z "$_IP_END" ]; then drbl-2.32.10/scripts/bin/drbl-ipcalc-list-137- echo "Illegal parameters for ipcalc!" >&2 ############################################## drbl-2.32.10/scripts/bin/drbl-ipcalc-list-174- if [ $dec_max_ip -ge $dec_current_ip ] && [ $dec_min_ip -le $dec_current_ip ] && [ $dec_network_ip -ne $dec_current_ip ] && [ $dec_broadcast_ip -ne $dec_current_ip ]; then drbl-2.32.10/scripts/bin/drbl-ipcalc-list:175: _tmp_bin_ip=`echo "ibase=A; obase=2; $dec_current_ip" | bc` drbl-2.32.10/scripts/bin/drbl-ipcalc-list-176- _IP_ARRAY[${#_IP_ARRAY[*]}]=${_tmp_bin_ip:1:32} ############################################## drbl-2.32.10/scripts/bin/list_available_rpm-20-usage () { drbl-2.32.10/scripts/bin/list_available_rpm:21: echo "Usage: `basename $0` [path]" drbl-2.32.10/scripts/bin/list_available_rpm-22- echo "Example:" drbl-2.32.10/scripts/bin/list_available_rpm:23: echo "`basename $0` /mirror/apt/RPMS.drbl-test" drbl-2.32.10/scripts/bin/list_available_rpm:24: echo "`basename $0` http://free.nchc.org.tw/fedora/apt/fedora/linux/2/i386/RPMS.drbl" drbl-2.32.10/scripts/bin/list_available_rpm-25-} ############################################## drbl-2.32.10/scripts/bin/drbl-detect-cdrom-6- if [ -e "$i" ]; then drbl-2.32.10/scripts/bin/drbl-detect-cdrom:7: media=`cat $i/media` drbl-2.32.10/scripts/bin/drbl-detect-cdrom:8: [ "$media" = "cdrom" ] && cdrom=`basename $i` drbl-2.32.10/scripts/bin/drbl-detect-cdrom-9- fi ############################################## drbl-2.32.10/scripts/bin/get-all-nic-ip-15- echo "To get the up network devices or IP address:" drbl-2.32.10/scripts/bin/get-all-nic-ip:16: echo "`basename $0` [OPTION]" drbl-2.32.10/scripts/bin/get-all-nic-ip-17- echo " Options:" ############################################## drbl-2.32.10/scripts/bin/find-url-in-yum-set-125- #wget -r -l1 --no-parent --passive-ftp -e robots=off -q -nd --retr-symlinks -P "$tmp_dir" $mirrorlist drbl-2.32.10/scripts/bin/find-url-in-yum-set:126: #mirror_file=`basename $mirrorlist` drbl-2.32.10/scripts/bin/find-url-in-yum-set-127- #baseurl="$(head -n 1 $tmp_dir/$mirror_file)" ############################################## drbl-2.32.10/scripts/bin/list_latest_rpm-27-usage () { drbl-2.32.10/scripts/bin/list_latest_rpm:28: echo "Usage: `basename $0` [path]" drbl-2.32.10/scripts/bin/list_latest_rpm-29- echo "Example:" drbl-2.32.10/scripts/bin/list_latest_rpm:30: echo "`basename $0` /mirror/apt/RPMS.drbl-test" drbl-2.32.10/scripts/bin/list_latest_rpm:31: echo "`basename $0` http://opensource.nchc.org.tw/fedora/apt/fedora/linux/2/i386/RPMS.drbl" drbl-2.32.10/scripts/bin/list_latest_rpm-32-} ############################################## drbl-2.32.10/scripts/bin/get-client-ip-list-33-ocs_file="$0" drbl-2.32.10/scripts/bin/get-client-ip-list:34:ocs=`basename $ocs_file` drbl-2.32.10/scripts/bin/get-client-ip-list-35-# Parse command-line options ############################################## drbl-2.32.10/scripts/sbin/drbl-powerful-thin-client-29- echo "Switch the DRBL clients to thin or powerful mode." drbl-2.32.10/scripts/sbin/drbl-powerful-thin-client:30: echo "Usage: `basename $0` [-p|--powerful] [-t|--thin]" drbl-2.32.10/scripts/sbin/drbl-powerful-thin-client-31- echo "-p, --powerful Powerful client" ############################################## drbl-2.32.10/scripts/sbin/drbl-nat-rules-26- # Check if firewall is configured (has tables) drbl-2.32.10/scripts/sbin/drbl-nat-rules:27: tables=`cat $PROC_IPTABLES_NAMES 2>/dev/null` drbl-2.32.10/scripts/sbin/drbl-nat-rules-28- [ -z "$tables" ] && return 1 ############################################## drbl-2.32.10/scripts/sbin/check_drbl_setup_space-18- echo "Check if the space is enough to install DRBL" drbl-2.32.10/scripts/sbin/check_drbl_setup_space:19: echo "Usage: `basename $0` [OPTION]" drbl-2.32.10/scripts/sbin/check_drbl_setup_space-20- echo "Options:" ############################################## drbl-2.32.10/scripts/sbin/drbl-nfs-conf-15-# drbl-2.32.10/scripts/sbin/drbl-nfs-conf:16:run_cmd="`basename $0`" drbl-2.32.10/scripts/sbin/drbl-nfs-conf-17- ############################################## drbl-2.32.10/scripts/sbin/drbl-nfs-conf-65-# check parameter drbl-2.32.10/scripts/sbin/drbl-nfs-conf:66:[ -n "`echo $rsize | grep [^0-9]`" ] && echo "rsize is \"$rsize\", but rsize must be numbers!!! Program terminated!" && exit 1 drbl-2.32.10/scripts/sbin/drbl-nfs-conf:67:[ -n "`echo $wsize | grep [^0-9]`" ] && echo "wsize is \"$wsize\", but wsize must be numbers!!! Program terminated!" && exit 1 drbl-2.32.10/scripts/sbin/drbl-nfs-conf-68-# The specified protocol is higher priority, it will overwrite the protocol gton from kernel config ############################################## drbl-2.32.10/scripts/sbin/drbl-functions-293- echo drbl-2.32.10/scripts/sbin/drbl-functions:294: echo "[$LOGNAME] You need to run this script \"`basename $0`\" as root." drbl-2.32.10/scripts/sbin/drbl-functions-295- echo ############################################## drbl-2.32.10/scripts/sbin/drbl-functions-1382- # So this method is better: drbl-2.32.10/scripts/sbin/drbl-functions:1383: DHCPDLEASE_DIR="$(dirname `rpm -ql dhcp | grep -E "dhcpd.leases$"`)" drbl-2.32.10/scripts/sbin/drbl-functions-1384- fi ############################################## drbl-2.32.10/scripts/sbin/drbl-functions-2662- trap "[ -f "$TMP" ] && rm -f $TMP" HUP INT QUIT TERM EXIT drbl-2.32.10/scripts/sbin/drbl-functions:2663: numfiles=`LC_ALL=C ls $DRBL_SCRIPT_PATH/lang/bash/*.UTF-8 2> /dev/null | wc -l` drbl-2.32.10/scripts/sbin/drbl-functions:2664: numfiles=`LC_ALL=C expr $numfiles + 0` drbl-2.32.10/scripts/sbin/drbl-functions-2665- # list the previous saved images ############################################## drbl-2.32.10/scripts/sbin/drbl-functions-2680- fi drbl-2.32.10/scripts/sbin/drbl-functions:2681: numfiles=`LC_ALL=C expr $numfiles + 1` drbl-2.32.10/scripts/sbin/drbl-functions-2682- done ############################################## drbl-2.32.10/scripts/sbin/drbl-functions-4785- echo "Create specific config for PXE and GRUB EFI NB client." drbl-2.32.10/scripts/sbin/drbl-functions:4786: set_specific_host_pxe_conf `cat $HOSTS_TMP` drbl-2.32.10/scripts/sbin/drbl-functions:4787: set_specific_host_grub_efi_conf `cat $HOSTS_TMP` drbl-2.32.10/scripts/sbin/drbl-functions-4788- else ############################################## drbl-2.32.10/scripts/sbin/switch-pxe-bg-mode-17- echo "To set the default PXE client menu:" drbl-2.32.10/scripts/sbin/switch-pxe-bg-mode:18: echo "`basename $0` [OPTION]" drbl-2.32.10/scripts/sbin/switch-pxe-bg-mode-19- echo " Options:" ############################################## drbl-2.32.10/scripts/sbin/switch-pxe-menu-24- echo "To hide, reveal or set default PXE client menu:" drbl-2.32.10/scripts/sbin/switch-pxe-menu:25: echo "`basename $0` [OPTION] [hide|reveal|setdefault]" drbl-2.32.10/scripts/sbin/switch-pxe-menu-26- echo "Options:" ############################################## drbl-2.32.10/scripts/sbin/set-default-pxe-img-17- echo "To set the default PXE client menu:" drbl-2.32.10/scripts/sbin/set-default-pxe-img:18: echo "`basename $0` [OPTION]" drbl-2.32.10/scripts/sbin/set-default-pxe-img-19- echo " Options:" ############################################## drbl-2.32.10/scripts/sbin/drbl-prepare-memtest-21- echo "-mv, --memtest86-version VERSION The memtest86+ version to be used with -u|--from-upstream. If not assigned, the version number specified in drbl.conf will be used." drbl-2.32.10/scripts/sbin/drbl-prepare-memtest:22: echo "-d, --deploy-to-system-too Deploy the file to DRBL system ($pxecfg_pd), too." drbl-2.32.10/scripts/sbin/drbl-prepare-memtest-23- echo "Ex: To use the memtest86+ 4.20 from $MEMTEST86_URL, run '$0 -u -mv 4.20'" ############################################## drbl-2.32.10/scripts/sbin/switch-efi-nb-menu-24- echo "To hide, reveal or set default uEFI network Boot client menu:" drbl-2.32.10/scripts/sbin/switch-efi-nb-menu:25: echo "`basename $0` [OPTION] [hide|reveal|setdefault]" drbl-2.32.10/scripts/sbin/switch-efi-nb-menu-26- echo "Options:" ############################################## drbl-2.32.10/scripts/sbin/set-default-grub-efi-img-17- echo "To set the default GRUB client menu:" drbl-2.32.10/scripts/sbin/set-default-grub-efi-img:18: echo "`basename $0` [OPTION] ENTRY_ID" drbl-2.32.10/scripts/sbin/set-default-grub-efi-img-19- echo " Options:" ############################################## drbl-2.32.10/scripts/sbin/set-default-grub-efi-img-38-ocs_file="$0" drbl-2.32.10/scripts/sbin/set-default-grub-efi-img:39:ocs=`basename $ocs_file` drbl-2.32.10/scripts/sbin/set-default-grub-efi-img-40-# ############################################## drbl-2.32.10/scripts/sbin/select-drbl-clients-301- echo "Select DRBL clients by IP or MAC address" drbl-2.32.10/scripts/sbin/select-drbl-clients:302: echo "Usage: `basename $0` [Options] RESULT_FILE" drbl-2.32.10/scripts/sbin/select-drbl-clients-303- echo "Options:" ############################################## drbl-2.32.10/scripts/sbin/drbl-prepare-pxelinux-30- echo "-pv, --pxelinux-version VERSION The pxelinux version to be used with -u|--from-upstream. If not assigned, the version number specified in drbl.conf will be used." drbl-2.32.10/scripts/sbin/drbl-prepare-pxelinux:31: echo "-d, --deploy-to-system-too Deploy the files to DRBL system ($pxecfg_pd), too." drbl-2.32.10/scripts/sbin/drbl-prepare-pxelinux-32- echo "-v, --verbose show verbose messages." ############################################## drbl-2.32.10/scripts/sbin/switch-efi-nb-bg-mode-17- echo "To set the default uEFI network boot client menu:" drbl-2.32.10/scripts/sbin/switch-efi-nb-bg-mode:18: echo "`basename $0` [OPTION]" drbl-2.32.10/scripts/sbin/switch-efi-nb-bg-mode-19- echo " Options:" ############################################## drbl-2.32.10/pkg/syslinux/makeboot.sh-75- echo drbl-2.32.10/pkg/syslinux/makeboot.sh:76: echo "[$LOGNAME] You need to run this script \"`basename $0`\" as root." drbl-2.32.10/pkg/syslinux/makeboot.sh-77- echo