if grep n8r /proc/cmdline > /dev/null 2>&1; then stty crtscts fi for x in 0 1 2 3 4 5 6 7 8 do mknod /dev/vcs$x c 7 $x mknod /dev/vcsa$x c 7 $[$x+128] done chmod 644 /dev/vcs* chown root /dev/vcs* cat >/tmp/foo.py < 0): percent = int(((count - 2) * 100)/numpack + .5) if(percent > 100): percent = 100 if(percent < 0): percent = 0 r2 = re.compile("^Installing (.*)\.") m2 = r2.search(line) if m2: newline = m2.group(1) newline = newline + " (" newline = newline + str(percent) newline = newline + "%)" # newline = newline + " [" # count = count - 2 # newline = newline + str(count) # newline = newline + "/" # newline = newline + str(numpack) # newline = newline + "]" else: newline = "prep" line = "installing " + newline if(line and post): line = "installing " + line if(not line): line = "installing prep" newSocket.send(line) break # if(command[0] == "sh"): #DEBUG purposes only, wide open root priv command here. # newcommand = "" # for i in command[1:]: # newcommand = newcommand + i + " " # output = os.popen(newcommand).read() # newSocket.send(output) # break if(command[0] == "screendump"): newcommand = "cat /dev/vcs" for i in command[1:]: newcommand = newcommand + i output = os.popen(newcommand).read() newSocket.send(output) break newSocket.close() finally: sock.close() EOF chmod 755 /tmp/foo.py /tmp/foo.py >/foo.log 2>&1 &