make it worked in OpenSolaris jail gnome-2-28
authordavelam
Sun, 24 Jan 2010 03:21:06 +0000
branchgnome-2-28
changeset 18602 54035e101b7b
parent 18601 bd06f8e0b504
child 18603 8f27589b3f37
make it worked in OpenSolaris jail
cron-script.sh
--- a/cron-script.sh	Sat Jan 23 12:52:03 2010 +0000
+++ b/cron-script.sh	Sun Jan 24 03:21:06 2010 +0000
@@ -179,13 +179,20 @@
     egrep -v '^(Requires|BuildRequires):' SUNWdesktop-cache.spec > SUNWdesktop-cache.spec.tmp.$$
     pkgtool build --nonotify --with-l10n ${DEBUG_BUILD} --define "nightly 1" --with-indiana-branding --define 'support_level supported' SUNWdesktop-cache.spec.tmp.$$
     rm -f SUNWdesktop-cache.spec.tmp.$$
-    su<<EO_SU
-    cat<<EOF>/usr/share/desktop-cache/restart_fmri
+
+    # hack the svc script
+    grep -i "OpenSolaris" /etc/release >/dev/null 2>&1
+    if [ $? -eq 0 ]; then
+        printf "1a\n\nexit 0\n.\nw"| pfexec ed -s /usr/share/desktop-cache/restart_fmri
+    else
+        su<<EO_SU
+        cat<<EOF>/usr/share/desktop-cache/restart_fmri
 #!/bin/ksh
 
 exit 0
 EOF
 EO_SU
+    fi
 fi
 
 # start the build