Brian O'Connor

Updating bin/karaf to fix ^D

Karaf's ConsoleImpl does the wrong thing with ^D; the underlying
ConsoleReader already knows what to do.

Change-Id: I2276c34e4219894fb394b560cce5ff8a2503e95a
......@@ -84,6 +84,10 @@ function build_stage_dir() {
perl -pi.old -e "s|^(featuresBoot=.*)|\1,$BOOT_FEATURES|" \
$ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg
# Patch the karaf start script to disable user interrupts
perl -pi.old -e "s|(-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true)|\1 -Dkaraf.ignoreInterrupts=true|" \
$ONOS_STAGE/$KARAF_DIST/bin/karaf
# Patch the Apache Karaf distribution with ONOS branding bundle
cp $M2_REPO/org/onosproject/onos-branding/$ONOS_POM_VERSION/onos-branding-*.jar \
$ONOS_STAGE/$KARAF_DIST/lib
......
......@@ -137,6 +137,12 @@ if ! grep -q ",onos-api," $KARAF_ROOT/etc/org.apache.karaf.features.cfg; then
$KARAF_ROOT/etc/org.apache.karaf.features.cfg
fi
if ! grep -q "ignoreInterrupts" $KARAF_ROOT/bin/karaf; then
# Patch the karaf start script to disable user interrupts
perl -pi.old -e "s|(-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true)|\1 -Dkaraf.ignoreInterrupts=true|" \
$KARAF_ROOT/bin/karaf
fi
if [ ! -f $KARAF_ROOT/lib/onos-branding-$ONOS_POM_VERSION.jar ]; then
# Patch the Apache Karaf distribution with ONOS branding bundle
echo "Branding as ONOS..."
......
......@@ -44,6 +44,9 @@ perl -pi.old -e "s|^(featuresRepositories=).*|\1mvn:org.apache.karaf.features/st
perl -pi.old -e "s|^(featuresBoot=).*|\1$BOOT_FEATURES|" \
$KARAF_DIR/etc/org.apache.karaf.features.cfg
# Patch the karaf start script to disable user interrupts
perl -pi.old -e "s|(-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true)|\1 -Dkaraf.ignoreInterrupts=true|" \
$KARAF_DIR/bin/karaf
# Patch the Apache Karaf distribution with ONOS branding bundle
cp $BRANDING $KARAF_DIR/lib
......