OSDN Git Service

The command that can be used with update is limited.
authorHideyuki Niwa <niwa.hideyuki@jp.fujitsu.com>
Mon, 14 Apr 2014 01:30:05 +0000 (10:30 +0900)
committerHideyuki Niwa <niwa.hideyuki@jp.fujitsu.com>
Mon, 14 Apr 2014 01:30:05 +0000 (10:30 +0900)
Only rpm, yum, and apt-get can be used.

lxcf/lib/lxcf-update

index 8fe637b..75338f5 100755 (executable)
@@ -34,6 +34,12 @@ if [ $# -lt 1 ]; then
        exit 1
 fi
 
+if [ x$1 != x"rpm" -a x$1 != x"yum" -a x$1 != x"apt-get" ] ; then
+       echo "Only the following commands can be used. "
+       echo "     rpm, yum, apt-get"
+       exit 1
+fi
+
 # args and environment variables
 UPDATECMD=$*
 PREFIX=/opt/lxcf
@@ -44,16 +50,16 @@ WORKUSR=/opt/lxcf/.work/usr
 LXCSTATES=`/usr/lib64/lxcf/lxcf-list | awk '{if (NR >2) print}'`
 
 # It is confirmed whether LXCF may stop all containers. 
-echo -n "stop all lxcf containers (yes/no)? "
-read ans
-case ${ans} in
-[Yy]|[Yy][Ee][Ss])
-       continue ;;
-[Nn]|[Nn][Oo])
-       exit 1 ;;
-*) 
-       exit 1;;
-esac
+echo -n "stop all lxcf containers (yes/no)? "
+read ans
+case ${ans} in
+[Yy]|[Yy][Ee][Ss])
+#      continue ;;
+[Nn]|[Nn][Oo])
+#      exit 1 ;;
+*) 
+#      exit 1;;
+esac
 
 # recovery container status
 check_stop_state() {