[yast-commit] r63962 - in /branches/SuSE-Code-11-SP2-Branch/yast2: data/sysconfig.yast2 package/yast2.changes scripts/yast2
Author: aschnell Date: Wed May 11 15:10:20 2011 New Revision: 63962 URL: http://svn.opensuse.org/viewcvs/yast?rev=63962&view=rev Log: - added snapper call to yast2 script Modified: branches/SuSE-Code-11-SP2-Branch/yast2/data/sysconfig.yast2 branches/SuSE-Code-11-SP2-Branch/yast2/package/yast2.changes branches/SuSE-Code-11-SP2-Branch/yast2/scripts/yast2 Modified: branches/SuSE-Code-11-SP2-Branch/yast2/data/sysconfig.yast2 URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/yast2/data/sysconfig.yast2?rev=63962&r1=63961&r2=63962&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/yast2/data/sysconfig.yast2 (original) +++ branches/SuSE-Code-11-SP2-Branch/yast2/data/sysconfig.yast2 Wed May 11 15:10:20 2011 @@ -52,3 +52,8 @@ # This option is experimental and not all YaST modules do support # configuration tracking via subversion SUBVERSION_ADD_DIRS_RECURSIVE="no" + +## Type: list(yes,no) +## Default: "yes" +# Enable use of snapper for YaST. +USE_SNAPPER="yes" Modified: branches/SuSE-Code-11-SP2-Branch/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/yast2/package/yast2.changes?rev=63962&r1=63961&r2=63962&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/yast2/package/yast2.changes (original) +++ branches/SuSE-Code-11-SP2-Branch/yast2/package/yast2.changes Wed May 11 15:10:20 2011 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed May 11 15:05:22 CEST 2011 - aschnell@suse.de + +- added snapper call to yast2 script +- 2.17.94 + +------------------------------------------------------------------- Fri May 06 11:47:03 CEST 2011 - aschnell@suse.de - backported some modules and functions need by storage Modified: branches/SuSE-Code-11-SP2-Branch/yast2/scripts/yast2 URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/yast2/scripts/yast2?rev=63962&r1=63961&r2=63962&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/yast2/scripts/yast2 (original) +++ branches/SuSE-Code-11-SP2-Branch/yast2/scripts/yast2 Wed May 11 15:10:20 2011 @@ -188,6 +188,28 @@ fi } + +SNAPPERBIN=/usr/bin/snapper + +snapshot_pre() +{ + if [ "$1" != "menu" ] ; then + if [ "$USE_SNAPPER" = "yes" -a -x $SNAPPERBIN ] ; then + SNAPSHOT_NUMBER=`$SNAPPERBIN create --type=pre --cleanup=number --print-number --description="yast $1"` + fi + fi +} + +snapshot_post() +{ + if [ "$1" != "menu" ] ; then + if [ "$USE_SNAPPER" = "yes" -a -x $SNAPPERBIN ] ; then + $SNAPPERBIN create --type=post --cleanup=number --pre-number=$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' -- "$@"` @@ -432,6 +454,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 @@ -440,6 +463,7 @@ break fi done + snapshot_post $module fi # cleanup -- 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