• R/O
  • HTTP
  • SSH
  • HTTPS

lxcf: Commit

lxcfのリポジトリ


Commit MetaInfo

Revision964ad7c9551076718030518f1c4f693929a6ee39 (tree)
Time2015-02-08 11:20:36
Authorniwa-hideyuki <niwa.hideyuki@jp.f...>
Commiterniwa-hideyuki

Log Message

Check on argument of net-del command

Change Summary

Incremental Difference

--- a/lxcf/lib/lxcf-net-add
+++ b/lxcf/lib/lxcf-net-add
@@ -63,7 +63,7 @@ if [ x"$NUM" != x"" ]; then
6363 exit -1
6464 fi
6565 NUM=$(( $NUM + 0 ))
66- if [ $NUM -lt 1 -o $NUM -gt 20 ]; then
66+ if [ $NUM -lt 1 -o $NUM -gt 32 ]; then
6767 echo "error: option -n $NUM is invalid"
6868 exit -1
6969 fi
--- a/lxcf/lib/lxcf-net-del
+++ b/lxcf/lib/lxcf-net-del
@@ -43,6 +43,20 @@ while getopts n:b: OPT ; do
4343 done
4444 shift $((OPTIND - 1))
4545
46+# check -n NUMBER option
47+if [ x"$NUM" != x"" ]; then
48+ /usr/lib64/lxcf/lxcf-parmchk-pnum $NUM
49+ if [ $? -ne 0 ]; then
50+ echo "error: option -n $NUM is invalid"
51+ exit -1
52+ fi
53+ NUM=$(( $NUM + 0 ))
54+ if [ $NUM -lt 1 -o $NUM -gt 32 ]; then
55+ echo "error: option -n $NUM is invalid"
56+ exit -1
57+ fi
58+fi
59+
4660 del_container()
4761 {
4862 LXCNAME=$1
Show on old repository browser