moonbase.lunar modification
Kok, Auke
sofar at foo-projects.org
Mon Mar 31 20:53:06 CEST 2008
lazyape wrote:
> if you "lin moonbase" and module.index is deleted or removed from the default location /var/state/lunar the "lin moonbase" is terminated with
> cp: cannot stat /var/state/lunar/module.index
>
> this patch fix this behaviour.
>
>
> --- moonbase.lunar 2008-03-30 12:54:15.200045773 +0300
> +++ moonbase.lunar 2008-03-30 12:54:06.427761136 +0300
> @@ -53,6 +53,9 @@
> mv $SYSTEM_MOONBASE/zlocal/ /var/lib/lunar/.zlocal-backup &&
> rm -rf $SYSTEM_MOONBASE &&
> TMP_MODULE_INDEX=$(temp_create "temp.module.index") &&
> + if [ ! -a $MODULE_INDEX ]; then
> + touch $MODULE_INDEX
> + fi
> cp $MODULE_INDEX $TMP_MODULE_INDEX &&
> lrm moonbase &&
> mkdir $SYSTEM_MOONBASE &&
>
>
> ps. i think "&&" can be deleted from the script
what is the problem you have?
this code is fairly fragile, we can't remove the '&&' lines at all and your
insertion will break a lot of things. Your patch is definately wrong as is.
Auke
More information about the Lunar-dev
mailing list