Skip to content

Commit

Permalink
Address Review Comments and made sure to invoke augtool
Browse files Browse the repository at this point in the history
only one and do string concatenation of all set commands
  • Loading branch information
abdosi committed Jun 29, 2020
1 parent 3af2577 commit 85943dd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,15 @@ set /files/etc/sysctl.conf/vm.panic_on_oom 2
set /files/etc/sysctl.conf/fs.suid_dumpable 2
" -r $FILESYSTEM_ROOT

sysctl_net_cmd_string=""
while read line; do
[[ "$line" =~ ^#.*$ ]] && continue
sysctl_net_conf_key=`echo $line | awk -F '=' '{print $1}'`
sysctl_net_conf_value=`echo $line | awk -F '=' '{print $2}'`
sudo augtool --autosave "
set /files/etc/sysctl.conf/$sysctl_net_conf_key $sysctl_net_conf_value
" -r $FILESYSTEM_ROOT
done<files/image_config/sysctl/sysctl-net.conf
sysctl_net_cmd_string=$sysctl_net_cmd_string"set /files/etc/sysctl.conf/$sysctl_net_conf_key $sysctl_net_conf_value"$'\n'
done < files/image_config/sysctl/sysctl-net.conf

sudo augtool --autosave "$sysctl_net_cmd_string" -r $FILESYSTEM_ROOT

## docker Python API package is needed by Ansible docker module
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'docker==4.1.0'
Expand Down

0 comments on commit 85943dd

Please sign in to comment.