sudo apt-get update
sudo apt-get install crudini
Examples:
# Add/Update a var
crudini --set config_file section parameter value
# Update an existing var
crudini --set --existing config_file section parameter value
# Delete a var
crudini --del config_file section parameter
# Delete a section
crudini --del config_file section
# output a value
crudini --get config_file section parameter
# output a global value not in a section
crudini --get config_file '' parameter
# output a section
crudini --get config_file section
# output a section, parseable by shell
eval $(crudini --get --format=sh config_file section)
# update an ini file from shell variable(s)
echo name="$name" | crudini --merge config_file section
# merge an ini file from another ini
crudini --merge config_file < another.ini
# compare two ini files using standard UNIX text processing
diff <(crudini --get --format=lines file1.ini|sort) \
<(crudini --get --format=lines file2.ini|sort)
# compare two ini files using other UNIX text processing
idiff <(crudini --get --format=lines fedora1.repo|sort) \
<(crudini --get --format=lines fedora2.repo|sort)
--- /dev/fd/63 2013-05-16 01:11:22.012934833 +0100
+++ /dev/fd/62 2013-05-16 01:11:22.012934833 +0100
@@ -9,12 +9,11 @@µ
[ fedora ] failovermethod = priority
[ fedora ] gpgcheck = 1
[ fedora ] gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
-[ fedora ] metadata_expire = 7d
[ fedora ] name = Fedora $releasever - $basearch
[ fedora-source ] enabled = 0
[ fedora-source ] failovermethod = priority
-[ fedora-source ] gpgcheck = 1
+[ fedora-source ] gpgcheck = 0
[ fedora-source ] gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[ fedora-source ] metadata_expire = 7d
'Cloud > Etc' 카테고리의 다른 글
LBaaS on Mitaka 구성 실패. (0) | 2016.06.22 |
---|---|
ubuntu mitaka lbaas v2 install (0) | 2016.06.10 |
[OpenStack Liberty 구축 후] Instance에서 apt-get update 안될때 방법 (2) | 2016.04.20 |
[OpenStack Liberty 구축 후] 볼륨 사이즈 문제 (1) | 2016.04.13 |