Browse Source

install_easy : inode use awk instead of cut. more commas

pull/33/head
bolvan 6 years ago
parent
commit
e6a1e5aa57
  1. 8
      install_easy.sh
  2. 2
      ipset/create_ipset.sh

8
install_easy.sh

@ -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
} }

2
ipset/create_ipset.sh

@ -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

Loading…
Cancel
Save