<p>コメント欄は spam だらけなので、ご用の方は x.com/takagiwa_m まで。</p>

To content | To menu | To search

qjail で diff がエラー

qjail で jail を作ろうとするとエラーになる。

OS は 12.2-RELEASE 。

# qjail create -4 <ip address> -n <network interface> <jail name>
error: conflicting output format options.
usage: diff [-aBbdilpTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]
            [--no-ignore-case] [--normal] [--strip-trailing-cr] [--tabsize]
            [-I pattern] [-L label] file1 file2
       diff [-aBbdilpTtw] [-I pattern] [-L label] [--ignore-case]
            [--no-ignore-case] [--normal] [--strip-trailing-cr] [--tabsize]
            -C number file1 file2
       diff [-aBbdiltw] [-I pattern] [--ignore-case] [--no-ignore-case]
            [--normal] [--strip-trailing-cr] [--tabsize] -D string file1 file2
       diff [-aBbdilpTtw] [-I pattern] [-L label] [--ignore-case]
            [--no-ignore-case] [--normal] [--tabsize] [--strip-trailing-cr]
            -U number file1 file2
       diff [-aBbdilNPprsTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]
            [--no-ignore-case] [--normal] [--tabsize] [-I pattern] [-L label]
            [-S name] [-X file] [-x pattern] dir1 dir2
       diff [-aBbditwW] [--expand-tabs] [--ignore-all-blanks]
            [--ignore-blank-lines] [--ignore-case] [--minimal]
            [--no-ignore-file-name-case] [--strip-trailing-cr]
            [--suppress-common-lines] [--tabsize] [--text] [--width]
            -y | --side-by-side file1 file2
Error invalid directories in flavor default.

/usr/local/bin/qjail がスクリプトだったので diff を探したら一箇所だけ出てきた。

    # Check the flavor for directories it should NOT be playing with.
    #
    # Load directory names to be excluded from diff to std-out
    # and pipe to the diff -X option.
    #
    example_flavor="/usr/local/share/examples/qjail/default"
    flavor_path="${flavors_dir}/${flavor}"

    /bin/cat  << EOF |
etc
home
root
EOF

    diff -ruq -X - "${example_flavor}" "${flavor_path}"
    [ $? -eq 0 ] || \
    kill "Error invalid directories in flavor ${flavor}."

diff のオプションの u と q がぶつかっているみたい。でもどちらかにしても相変わらずエラーになる。


2020 Nov 27 追記

diff は、/usr/local/share/examples/qjail/default/etc/ に resolv.conf が無かったことに文句を言っていた。

# cp /usr/jails/flavors/default/etc/resolv.conf /usr/local/share/examples/qjail/default/etc/
# diff -r /usr/local/share/examples/qjail/default /usr/jails/flavors/default

で何も出ないことを確認したら、ひとまず qjail create は通るようになった。

Add a comment

HTML code is displayed as text and web addresses are automatically converted.

They posted on the same topic

Trackback URL : https://www.pseudomoon.jp/dotclear/index.php?trackback/125

This post's comments feed