View Single Post
Old 12-24-2011, 03:48 AM   #2
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
And here is the script that was damaged, and has now been restored:

[root@kindle root]# cat /etc/upstart/framework
Spoiler:
PHP Code:
#! /bin/sh

# check for framework disabled

source /etc/upstart/functions
JHOME
=/usr/java
JLIB
=/usr/java/lib
EHOME
=/opt/amazon/ebook
LIBHOME
=/opt/amazon/ebook/lib

# construct clazzpath from lib, booklet, testlibdir
LPATH=$LIBHOME/concierge-1.0.0.jar:$LIBHOME/icu4j.jar:$LIBHOME/utilities.jar:$LIBHOME/json_simple-1.1.jar

JAR_LIST
=$(find $EHOME/lib $EHOME/booklet /usr/local/ebook/lib -name \*.jar 2>/dev/null)
CPATH=$(echo $JAR_LIST sed -'s/ \+/:/g')

# heap changes

if [ "$(awk '/^MemTotal:/ {print $2}' </proc/meminfo)" -gt 255000 ]; then
  HEAP
="-Xmx20m -Xgc:youngGen=3m"
else
  
HEAP="-Xmx16m -Xgc:youngGen=1m"
fi

WAN_EXISTS
=true
WIFI_EXISTS
=true
f_wan 
|| WAN_EXISTS=false
f_wifi 
|| WIFI_EXISTS=false

AOPTS
="-Ddebug=1 \
-Dxargs=
$EHOME/bin/init.xargs \
-Dcheck_comm_stack=true \
-Dawt.eventThreadPriority=7 \
-Dgci.eventThreadPriority=7 \
-Dfeature.wifiPresent=
$WIFI_EXISTS \
-Dfeature.wanPresent=
$WAN_EXISTS \
-Dsun.net.client.defaultReadTimeout=120000 \
-Dhttp.keepalive.timeout=60000 \
-Dhttp.maxConnections=16 \
-Dallow_demo=false \
-Djava.awt.SyncOnPaint=false \
-Dextkeyboard=false \
-Dconfig=
$EHOME/config/framework.$(f_platform).conf \
-DPLATFORM_CLASS_FILE=
$EHOME/config/platform.conf \
-DENABLE_SEARCH_INDEXING_THREAD=true \
-Dpolicy.home=
$EHOME/security \
-Djava.security.manager \
-Djava.awt.DebugPaint=false \
-DUSE_KWGRAPHICS=false \
-Dx11.sync=true \
-Dx11.dpi=72 \
-Dbuttons.noxor=true \
-Dcc_transport_jni=true \
-Dawt.clickRadius=25 \
-Dawt.multiClickRadius=100 \
-DappContext.disposeClearsSoftReferences=true \
-Djavax.microedition.plaf.platformfactory=com.amazon.agui.swing.plaf.kindle.KindlePlatformFactory"

# enable more cvm crash logging/reporting
export CVM_LOG_LEVEL=4

APP
=ch.ethz.iks.concierge.framework.Framework

# XXX - are any of these needed anymore?

# use either jvmpi or jvmti, not both
#IHPROF="-Xrunhprof:heap=all,thread=y,file=/mnt/base-us/framework.$$.hprof.txt"
#IHPROF="-Xbootclasspath/a:$JLIB/java_crw_demo.jar \
#                -agentlib:jvmtihprof=cpu=times,heap=sites,thread=y,file=/mnt/us/framework.$$.hprof.txt"

#DEBUG="-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=y -Xdebug -DMinimumKindletTimeoutMillis=60000"

if [ -/mnt/us/PROFILE_CVM_NB ]
then
    
# NetBeans profiling
    
DEBUG="-agentlib:profilerinterface=lib/profiler/lib,5140"
    
LPATH=$LPATH:$JLIB/profiler/lib/jfluid-server.jar:$JLIB/profiler/lib/jfluid-server-cvm.jar

elif 
[ -/mnt/us/DEBUG_CVM_JDWP ] || [ -/mnt/us/DEBUG_CVM_JDWP_SUSPEND ]
then
    SUSPEND
=n
    
if [ -/mnt/us/DEBUG_CVM_JDWP_SUSPEND ]
    
then
        SUSPEND
=y
    fi
     
# N.B. the line below does not appear in /proc/$(pidof cvm)/cmdline, even though debugging is enabled
     
DEBUG="-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=$SUSPEND -Xdebug -DMinimumKindletTimeoutMillis=60000"
fi

JOPTS
="-Dsun.awt.exception.handler=com.amazon.agui.swing.event.EventQueueExceptionHandler \
-Xbootclasspath/a:
$JLIB/localedata.jar:$JLIB/charsets.jar:$LPATH \
-Dsun.boot.library.path=
$JLIB \
-cp 
$CPATH"

if [ -/mnt/us/DEBUG_CVM_CRASH ]; then
  CRASH
=/mnt/us/DEBUG_CVM_CRASH
  export CVM_CRASH_DEBUG
=1
  f_log D framework crash_debug 
"" "To disable, remove ${CRASH}"
fi

OPTS
="$HEAP $JOPTS $IHPROF $DEBUG $AOPTS"
rm -rf /var/local/java/default

# Capture stdout/stderr and log it.
# Unfortunately, if framework is killed, it might not kill cvm.
# If this happens, we rely on framework.conf to do a killall cvm.
# Nasty? Yes, but until cvm can directly log its stderr/stdout to
# syslog this is the best we can do.
$JHOME/bin/cvm $OPTS $APP 2>&logger -p local2.debug
exit 

It still does not boot though...

I wonder if it has a permissions problem...

EDIT: I just rebooted and checked the file:
ls -al /etc/upstart/framework
-rwxr-xr-x 1 root root 3611 Nov 3 2011 /etc/upstart/framework

That looks okay to me. I am certain that it has been put back to the way it was before I changed anything on the root partition. That is the original file that had been renamed and replaced by an editted copy. It was restored by deleting the copy and renaming the original file back to its original name.

Does anybody have any ideas why it still won't boot?

Last edited by geekmaster; 12-24-2011 at 03:54 AM.
geekmaster is offline   Reply With Quote