install_easy : inode use awk instead of cut. more commas

This commit is contained in:
bolvan 2019-05-08 10:33:35 +03:00
parent d0cd265730
commit e6a1e5aa57
2 changed files with 5 additions and 5 deletions

View File

@ -42,7 +42,7 @@ exitp()
get_dir_inode() get_dir_inode()
{ {
ls -id "$1" | cut -f1 -d ' ' ls -id "$1" | awk '{print $1}'
} }
md5file() md5file()
@ -150,10 +150,10 @@ write_config_var()
eval M="\$$1" eval M="\$$1"
if [ -n "$M" ]; then if [ -n "$M" ]; then
sed -ri "s/^#?$1=.*$/$1=$M/" $EXEDIR/config sed -ri "s/^#?$1=.*$/$1=$M/" "$EXEDIR/config"
else else
# write with comment at the beginning # write with comment at the beginning
sed -ri "s/^#?$1=.*$/#$1=/" $EXEDIR/config sed -ri "s/^#?$1=.*$/#$1=/" "$EXEDIR/config"
fi fi
} }
select_mode() select_mode()
@ -335,7 +335,7 @@ install_sysv_init()
if [ "$script_mode" = "Y" ] || [ "$script_mode" = "y" ]; then if [ "$script_mode" = "Y" ] || [ "$script_mode" = "y" ]; then
echo "copying : $INIT_SCRIPT_SRC => $INIT_SCRIPT" echo "copying : $INIT_SCRIPT_SRC => $INIT_SCRIPT"
cp -f $INIT_SCRIPT_SRC $INIT_SCRIPT cp -f "$INIT_SCRIPT_SRC" "$INIT_SCRIPT"
fi fi
} }

View File

@ -12,7 +12,7 @@ IP2NET=$EXEDIR/../ip2net/ip2net
create_ipset() create_ipset()
{ {
local IPSTYPE local IPSTYPE
if [ -x $IP2NET ]; then if [ -x "$IP2NET" ]; then
IPSTYPE=hash:net IPSTYPE=hash:net
else else
IPSTYPE=$1 IPSTYPE=$1