[yast-commit] r63203 - in /trunk/yast2: data/sysconfig.yast2 package/yast2.changes scripts/yast2
Author: aschnell Date: Tue Jan 18 16:39:08 2011 New Revision: 63203 URL: http://svn.opensuse.org/viewcvs/yast?rev=63203&view=rev Log: - call snapper from yast2 script Modified: trunk/yast2/data/sysconfig.yast2 trunk/yast2/package/yast2.changes trunk/yast2/scripts/yast2 Modified: trunk/yast2/data/sysconfig.yast2 URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/data/sysconfig.yast2?rev=63203&r1=63202&r2=63203&view=diff ============================================================================== --- trunk/yast2/data/sysconfig.yast2 (original) +++ trunk/yast2/data/sysconfig.yast2 Tue Jan 18 16:39:08 2011 @@ -62,3 +62,8 @@ # summary - display an installation summary dialog, there user can decide whether to finish or restart # The summary dialog is always displayed when an installation error has occured. PKGMGR_ACTION_AT_EXIT="close" + +## Type: list(yes,no) +## Default: "yes" +# Enable use of snapper for YaST. +USE_SNAPPER="yes" Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=63203&r1=63202&r2=63203&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Tue Jan 18 16:39:08 2011 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Tue Jan 18 16:37:53 CET 2011 - aschnell@suse.de + +- call snapper from yast2 script + +------------------------------------------------------------------- Tue Jan 4 13:42:54 UTC 2011 - lslezak@suse.cz - check PackageKit status, suggest to quit the daemon if it is Modified: trunk/yast2/scripts/yast2 URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/scripts/yast2?rev=63203&r1=63202&r2=63203&view=diff ============================================================================== --- trunk/yast2/scripts/yast2 (original) +++ trunk/yast2/scripts/yast2 Tue Jan 18 16:39:08 2011 @@ -17,7 +17,7 @@ # allow for a different prefix # strip the basename off $0, which can be: (bnc#382216, bnc#458385) -# /sbin/yast2, /sbin/yast, yast2 (sh -x yast2 ...), /sbin//yast2 (PATH=/sbin/:...) +# /sbin/yast2, /sbin/yast, yast2 (sh -x yast2 ...), /sbin/yast2 (PATH=/sbin/:...) shopt -s extglob mydir=${0%%*(/)[YyZz]a[Ss][Tt]?(2)} if [[ -z "$mydir" || "$mydir" = /sbin ]]; then @@ -208,6 +208,28 @@ fi } + +SNAPPERBIN=/usr/bin/snapper + +snapshot_pre() +{ + if [ "$1" != "menu" ] ; then + if [ "$USE_SNAPPER" = "yes" -a -x $SNAPPERBIN ] ; then + SNAPSHOT_NUMBER=`$SNAPPERBIN --print-number create pre "yast2 $1"` + fi + fi +} + +snapshot_post() +{ + if [ "$1" != "menu" ] ; then + if [ "$USE_SNAPPER" = "yes" -a -x $SNAPPERBIN ] ; then + $SNAPPERBIN create post $SNAPSHOT_NUMBER + fi + fi +} + + TEMP=`/usr/bin/getopt -o hlg:s:Si --long help,list,kcontrol,geometry:,style:,strings,install,update,remove,fullscreen,noborder,qt,gtk,ncurses \ -n 'yast2' -- "$@"` @@ -388,6 +410,7 @@ # all other cases when YaST has to be restarted *) REDO_FILE=/var/lib/YaST2/restart_yast ;; esac + snapshot_pre $module # break out on errors, #343258 while [ $exit_code = 0 ]; do $ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS @@ -396,6 +419,7 @@ break fi done + snapshot_post $module fi if [ "$UID" = 0 ]; then -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn2.opensuse.org