]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Remove old nohup/disown code from kvmx shell since qemu is now immune to hangups
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 17 Jun 2018 16:31:50 +0000 (13:31 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 17 Jun 2018 16:31:50 +0000 (13:31 -0300)
kvmx

diff --git a/kvmx b/kvmx
index 8acd1b2dbb2cab469dbb2d8ba98166a6a1cdac77..2dc982aef1d9d8352e12edd5e946c340b05a2272 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -1793,7 +1793,6 @@ function kvmx_version {
 
 # Shell
 function kvmx_shell {
-  #local tail=""
   local restricted="$1"
   local restricted_actions=":status:start:stop:poweroff:suspend:resume:console:monitor"
         restricted_actions="$restricted_actions:wipe:shred:app_base:version:list_image:kill:"
@@ -1816,54 +1815,13 @@ function kvmx_shell {
           echo "Running in restricted shell mode."
           echo "Allowed commands are only `echo $restricted_actions | tr ':' ' '`"
         else
-          #if [ "${STDIN[0]}" == "up" ] || [ "${STDIN[0]}" == "start" ] || [ "${STDIN[0]}" == "restart" ]; then
-          #  # Process command, nohup version, stdout and stderr are redirected to a file
-          #  #nohup $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1} < /dev/null >> $LOG_DIR/nohup 2>&1 &
-
-          #  # Process command, disown version, stdout are preserved
-          #  #$APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1} &
-          #  $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1} < /dev/null >> $LOG_DIR/nohup 2>&1 &
-          #  disown -h
-
-          #  sleep 1
-          #  if [ -e "$LOG_DIR/nohup" ] && [ -z "$tail" ]; then
-          #    tail -F $LOG_DIR/nohup &
-          #    tail="$1"
-          #  fi
-          #  sleep 1
-          #else
-          #  $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1}
-          #fi
           $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1}
         fi
       else
-        #if [ "${STDIN[0]}" == "up" ] || [ "${STDIN[0]}" == "start" ] || [ "${STDIN[0]}" == "restart" ]; then
-        #  # Process command, nohup version
-        #  #nohup $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1} < /dev/null >> $LOG_DIR/nohup 2>&1 &
-
-        #  # Process command, disown version
-        #  #$APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1} &
-        #  $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1} < /dev/null >> $LOG_DIR/nohup 2>&1 &
-        #  disown -h
-
-        #  sleep 1
-        #  if [ -e "$LOG_DIR/nohup" ] && [ -z "$tail" ]; then
-        #    tail -F $LOG_DIR/nohup &
-        #    tail="$1"
-        #  fi
-        #  sleep 1
-        #else
-        #  $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1}
-        #fi
         $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1}
       fi
     fi
   done
-
-  #if [ ! -z "$tail" ]; then
-  #  kill $tail &> /dev/null
-  #  #rm -f $LOG_DIR/nohup
-  #fi
 }
 
 # Xrandr integration